CLI
artifakt publishes and manages pages from a shell. Each command makes one HTTP API call.
Install
Log in
Create an API key at https://artifakt.one/app/settings/keys, then save it or set ARTIFAKT_API_KEY.
echo "$KEY" | artifakt auth login
artifakt auth status
artifakt auth logout
export ARTIFAKT_API_KEY=ak_...auth loginchecks the key, then saves it with the server URL. On a terminal it prompts for the key. Otherwise it reads stdin.- Saved to
$XDG_CONFIG_HOME/artifakt/credentials.json, default~/.config/artifakt/credentials.json. On Windows the default is%AppData%\artifakt\credentials.json. Mode 0600. ARTIFAKT_API_KEYwins over the saved key. The saved key is used only when its server matches the current server.auth logoutdeletes the saved file. It does not revoke the key.
Commands
| Command | Flags | Prints |
|---|---|---|
auth login | None | Nothing to stdout |
auth status | None | Server and key source |
auth logout | None | Nothing to stdout |
publish <file|-> | -t, --title, -d, --description, -f, --format markdown|html, -a, --access public|password|team|only_me, --password-stdin | Page URL |
pages list | -q, --query title contains text, -n, --limit 1 to 50, default 20 | Table: ID, ACCESS, UPDATED, TITLE, newest first |
pages get <id> | None | Page source |
pages update <id> <file|-> | -t, --title, -d, --description | Page URL |
pages details <id> | -t, --title, -d, --description, at least one | Page URL |
pages access <id> <public|password|team|only_me> | --password-stdin | Page URL |
pages delete <id> | -y, --yes skip the prompt | Nothing to stdout |
init [dir] | None | Nothing to stdout |
completion bash|zsh|fish|powershell | None | Completion script |
artifakt publish plan.md
artifakt publish report.html --title "Q3"
cat notes.md | artifakt publish -
some-tool | artifakt publish - --format html
echo "$PASSWORD" | artifakt publish brief.md --access password --password-stdin
artifakt pages list --query plan --limit 5
artifakt pages get 7Hq2xK9mPq3vRt8w > page.md
artifakt pages update 7Hq2xK9mPq3vRt8w page.md
artifakt pages details 7Hq2xK9mPq3vRt8w --description "New summary"
artifakt pages access 7Hq2xK9mPq3vRt8w only_me
artifakt pages delete 7Hq2xK9mPq3vRt8w --yes
artifakt init path/to/project-reads the page from stdin.publishdefaults: formathtmlfor.htmland.htm, elsemarkdown. Title from the first level-1 heading or the HTML<title>. Description from a markdown page's first paragraph. Accesspublic.--password-stdinreads the password from stdin, so it needs a file argument, not-.pages updatereplaces the content and adds a version. The link stays. Without-d, the current description stays.pages detailschanges only title or description. Content and version stay.pages getcuts sources over 100,000 characters and prints a note to stderr.pages deletedeletes every version. Without a terminal it needs--yes.initwrites a rule block intoAGENTS.mdandCLAUDE.mdtelling agents to publish with artifakt.one. It creates missing files, replaces its own block on a rerun, and skips aCLAUDE.mdthat imports@AGENTS.md.
Global flags
| Flag | Description |
|---|---|
--json | Print the API response as is. |
--url | Server address. Default: $ARTIFAKT_URL, then the server saved by auth login, then https://artifakt.one. |
-h, --help | Print help for the command. |
-v, --version | Print the CLI version. |
Output and exit codes
Results go to stdout. Messages and errors go to stderr. Without a terminal the CLI never prompts.
id=$(artifakt publish plan.md --json | jq -r .id)
artifakt pages access "$id" only_me| Exit code | Meaning |
|---|---|
0 | Success. |
1 | The server refused, the request failed, or the delete prompt got no. stderr has the reason. |
2 | Wrong command, flag or arguments. |
Environment
| Variable | Description |
|---|---|
ARTIFAKT_API_KEY | API key. Wins over the saved key. |
ARTIFAKT_URL | Server address for a self-hosted artifakt.one. --url wins over it. |
XDG_CONFIG_HOME | Directory for the saved key. |