Skip to content
artifakt.one
CLI

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.

shell
echo "$KEY" | artifakt auth login
artifakt auth status
artifakt auth logout
export ARTIFAKT_API_KEY=ak_...
  • auth login checks 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_KEY wins over the saved key. The saved key is used only when its server matches the current server.
  • auth logout deletes the saved file. It does not revoke the key.

Commands

CommandFlagsPrints
auth loginNoneNothing to stdout
auth statusNoneServer and key source
auth logoutNoneNothing to stdout
publish <file|->-t, --title, -d, --description, -f, --format markdown|html, -a, --access public|password|team|only_me, --password-stdinPage URL
pages list-q, --query title contains text, -n, --limit 1 to 50, default 20Table: ID, ACCESS, UPDATED, TITLE, newest first
pages get <id>NonePage source
pages update <id> <file|->-t, --title, -d, --descriptionPage URL
pages details <id>-t, --title, -d, --description, at least onePage URL
pages access <id> <public|password|team|only_me>--password-stdinPage URL
pages delete <id>-y, --yes skip the promptNothing to stdout
init [dir]NoneNothing to stdout
completion bash|zsh|fish|powershellNoneCompletion script
shell
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.
  • publish defaults: format html for .html and .htm, else markdown. Title from the first level-1 heading or the HTML <title>. Description from a markdown page's first paragraph. Access public.
  • --password-stdin reads the password from stdin, so it needs a file argument, not -.
  • pages update replaces the content and adds a version. The link stays. Without -d, the current description stays.
  • pages details changes only title or description. Content and version stay.
  • pages get cuts sources over 100,000 characters and prints a note to stderr.
  • pages delete deletes every version. Without a terminal it needs --yes.
  • init writes a rule block into AGENTS.md and CLAUDE.md telling agents to publish with artifakt.one. It creates missing files, replaces its own block on a rerun, and skips a CLAUDE.md that imports @AGENTS.md.

Global flags

FlagDescription
--jsonPrint the API response as is.
--urlServer address. Default: $ARTIFAKT_URL, then the server saved by auth login, then https://artifakt.one.
-h, --helpPrint help for the command.
-v, --versionPrint the CLI version.

Output and exit codes

Results go to stdout. Messages and errors go to stderr. Without a terminal the CLI never prompts.

shell
id=$(artifakt publish plan.md --json | jq -r .id)
artifakt pages access "$id" only_me
Exit codeMeaning
0Success.
1The server refused, the request failed, or the delete prompt got no. stderr has the reason.
2Wrong command, flag or arguments.

Environment

VariableDescription
ARTIFAKT_API_KEYAPI key. Wins over the saved key.
ARTIFAKT_URLServer address for a self-hosted artifakt.one. --url wins over it.
XDG_CONFIG_HOMEDirectory for the saved key.