ATTIM CLI
The ATTIM CLI turns a folder, ./dist, or a single index.html into a live URL. It builds the file manifest, requests presigned upload targets, uploads files, and finalizes the version by default.
Install and run
Run without installing:
npx attim publish ./distOr install globally so attim is available as a bare command:
npm install -g attim
attim login
attim publish ./distFor local development from this repo:
cd cli
npm test
node ./bin/attim.mjs --helpAuthentication
Run attim login to authenticate with your ATTIM email code and store an account API token locally. The config file is stored at ~/.config/attim/config.json by default. Set ATTIM_CONFIG_DIR to override the config directory.
attim login
attim whoami
attim update my-site ./distIf your account already has an active account API token, attim login automatically rotates it because ATTIM cannot reveal an existing raw token again. Use --token only when you already saved a token and want to store it locally without rotating:
attim login # create or rotate the account API token and store it locally
attim login --rotate # explicit rotate; kept for scripted flows
attim login --token attim_uat_... # store a token you already savedattim logout removes the locally stored token only. It does not revoke the server-side account API token; revoke that from /access if needed.
Credential precedence for claimed-site commands is:
--token <token>ATTIM_API_TOKEN- token saved by
attim login
Anonymous publish claim tokens returned by the CLI are saved locally and reused for update, finalize, delete, and claim. Use --claim-token or ATTIM_CLAIM_TOKEN when managing an anonymous site published elsewhere.
Claim locally saved anonymous sites after login:
attim claim my-site
attim claim --allPublishing
attim publish ./dist
attim publish index.html
attim publish ./dist --slug my-site --token attim_uat_...
attim publish ./dist --password secret-password
attim publish ./dist --no-finalize
attim publish ./dist --dry-run
attim clone source-site --ttl 86400
attim fork source-site --slug my-copy --token attim_uat_...publish creates a generated ATTIM slug and prints the live URL on the first line. If the site is anonymous, ATTIM returns a claimToken once; save it if you need to update, delete, or claim the site later.
clone copies an anonymous live source site into a new anonymous site and prints a new one-time claimToken. fork copies an anonymous live source site into your authenticated account as an owned site.
- Directory publishes require a root
index.html. - Single-file publishes are uploaded as
index.html. --slugrequires account authentication and creates an owned site.--passwordenables password protection during publish.--password-access-ttlsets the access duration for publish-time password protection.--no-finalizeuploads files but leaves the version pending.--dry-runbuilds and validates the local manifest without API or upload calls.--jsonprints machine-readable JSON.
Forking and cloning
attim clone source-site --ttl 86400
attim fork source-site --slug my-copy --token attim_uat_...clonecreates an anonymous copy with independent storage and a newclaimToken.forkcreates an owned copy and requires an account API token.- The first release copies static files and basic metadata, not passwords, paywalls, grants, or source claim tokens.
Updating an existing site
attim update my-site ./dist
attim update my-site ./dist --token attim_uat_...
attim update my-site ./dist --claim-token ANONYMOUS_CLAIM_TOKEN
attim update my-site ./dist --dry-runLifecycle commands
attim finalize my-site 12 --claim-token ANONYMOUS_CLAIM_TOKEN
attim delete my-site --token attim_uat_...
attim info my-site
attim listPublic variables
Public variables let you customize claimed sites without editing uploaded files. Placeholders like {{ vars.PRODUCT_NAME }} in text files are replaced at serve time.
attim variables list my-site
attim variables list my-site --token attim_uat_...
attim variables set my-site API_BASE_URL https://api.example.com --token attim_uat_...
attim variables delete my-site API_BASE_URL --token attim_uat_...Values are inserted literally and may be visible in page source. Do not store passwords or private API keys in public variables.
Password protection
Password-protect a site so visitors must enter a password before viewing content. This works for both anonymous and claimed sites.
# Enable on an owned site
attim password enable my-site secret-password --access-ttl 86400 --token attim_uat_...
# Enable on an anonymous site using its claim token
attim password enable my-site secret-password --claim-token ANONYMOUS_CLAIM_TOKEN
# Disable
attim password disable my-site --token attim_uat_...--access-ttlcontrols how long a successful password unlock lasts (in seconds). Default is server-configured.- Anonymous sites require
--claim-tokenorATTIM_CLAIM_TOKEN. - Claimed sites require an account API token.
- You can also enable password protection during publish with
--password.
x402 paywalls
x402 paywalls let you charge visitors a small amount to access a claimed site for a configured duration.
First, set a payment wallet:
attim wallet
attim wallet set 0x0000000000000000000000000000000000000001 --network eip155:8453 --token attim_uat_...
attim wallet clear --network eip155:8453 --token attim_uat_...Then enable a paywall on a site:
attim paywall enable my-site 0.25 --network eip155:8453 --access-ttl 86400 --token attim_uat_...
attim paywall disable my-site --network eip155:8453 --token attim_uat_...priceUsdis the price in US dollars (e.g.,0.25for 25 cents).--networkuses CAIP-2 network identifiers likeeip155:8453(Base). Defaults to the server default.--access-ttlcontrols how long payment access lasts (in seconds).- Paywalls require a configured wallet for the selected network.
- Paywall commands require an account API token.
Diagnostics
Run attim doctor to check local Node support, ATTIM API reachability, config location, and token validity.
Run attim list after login to list owned sites visible to the saved account API token.
Global options
--base-url <url>: ATTIM base URL. Defaults tohttps://attim.linkorATTIM_BASE_URL.--token <token>: account API token. Defaults toATTIM_API_TOKEN, then the token saved byattim login.--claim-token <token>: anonymous site management token. Defaults toATTIM_CLAIM_TOKEN.--ttl <seconds>: TTL for anonymous publishes or clones.--slug <slug>: explicit destination slug for authenticated publishes or forks.--json: print machine-readable JSON.--help: show usage.--version: show the CLI version.
Notes
- Publish and update print progress to stderr for interactive runs.
--jsonkeeps stdout machine-readable. - Uploads run with bounded concurrency and retry transient upload failures.
- MCP is served by the backend at
/mcp; account API tokens enable the full tool set, while anonymous MCP can be enabled server-side for limited claim-token-controlled publishing tools.
