{"_id":"past-dev","_rev":"3-3e9e5315c3ab3ee868dcd8c4b86d1333","name":"past-dev","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.0-stage":{"name":"past-dev","version":"0.0.0-stage","_id":"past-dev@0.0.0-stage","stub":true,"maintainers":[{"name":"louis.tissot","email":"louis@revo.ai"}],"dist":{"shasum":"ece1adac9243a2deb2c0933b5baa9ee6ce83761e","tarball":"https://registry.npmjs.org/past-dev/-/past-dev-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-nroI0ghNONu3fgEK4zbnO35nn5P7kRThxtFqD1J+9JYFCBGsxs3vJ7xEYO7GnKSdFMPUx4NdVsrIEUcRMHfYaQ==","signatures":[{"sig":"MEYCIQDSIx1B9dwPs1drAJRWkFfZhMGPpMUjvguEh5FqxicDcwIhAIybCnKIT/yAZIQSQcr7jUtzp0vPddZy8QQBbfmbVdDL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":330},"_npmUser":{"name":"louis.tissot","email":"louis@revo.ai"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"name":"past-dev","version":"0.1.0","keywords":["past","memory","api","agents","cli"],"license":"MIT","_id":"past-dev@0.1.0","maintainers":[{"name":"louis.tissot","email":"louis@revo.ai"}],"homepage":"https://past.dev","bugs":{"email":"support@past.dev"},"bin":{"past":"bin/past.mjs","past-dev":"bin/past.mjs"},"dist":{"shasum":"54224fa95f81ac9342c4cfdcc75803d9973db49f","tarball":"https://registry.npmjs.org/past-dev/-/past-dev-0.1.0.tgz","fileCount":23,"integrity":"sha512-yjtuNLWzaEcQ3NQH5wq5kNC6j4L+VaCGTDt8XjidOha9gCa1BmLrRBAys67A8Dj3BmCcviVo4wpHKiC7haaIow==","signatures":[{"sig":"MEUCIE1bv7tbq0Rw+dUgYZMZxjWAbo8a7GJj8ROmNXe0Ks44AiEAkq91onA95pRG51tCP9aRBdrb1J+do/j0Xr2LDw94CMY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCCgBtDvxGsYully8rwVJeyEs7gvFFizd05qYMZkUkzbwIhAJ8GkW7Z86P5nMYI7NbocghkjZPewli6H6yn5gHdkzex","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186675},"type":"module","engines":{"node":">=18"},"scripts":{"test":"node --test tests/abandon.test.mjs tests/agent.test.mjs tests/api.test.mjs tests/browser.test.mjs tests/claim-state.test.mjs tests/claim.test.mjs tests/cli.test.mjs tests/commands.test.mjs tests/config.test.mjs tests/env-file.test.mjs tests/git.test.mjs tests/init.test.mjs tests/output.test.mjs tests/package.test.mjs tests/plugin-config.test.mjs tests/secrets.test.mjs tests/status.test.mjs tests/waiter.test.mjs","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"louis.tissot","email":"louis@revo.ai"},"repository":{"url":"git+https://github.com/Iteration-X/past.git","type":"git","directory":"cli"},"_npmVersion":"11.9.0","description":"The command line for past.dev: make a project with no account and claim it, send data points to memory, and recall them.","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"18.19.130"},"_npmOperationalInternal":{"tmp":"tmp/past-dev_0.1.0_1794229353628_0.7619168611012481","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"past-dev@0.2.0","bin":{"past":"bin/past.mjs","past-dev":"bin/past.mjs"},"bugs":{"email":"support@past.dev"},"dist":{"shasum":"ffafc61a731b4f9cdaac237deb06f1337d5551f0","tarball":"https://registry.npmjs.org/past-dev/-/past-dev-0.2.0.tgz","fileCount":26,"integrity":"sha512-c141ER3xS0QM5kilJdFYsPNxbq/oQEIvc0Ro3yoSTjv9nkb5fgp1p4Wds3/k5VrsARFDRR2Co9Zb2xXDH9EzVw==","signatures":[{"sig":"MEQCIHkGLOVnxNrbfZi/9LIQ3FWWB/GDKcypkFJWxmPOBGjeAiAi1uQc8nNRLfKfpTnpLHjGdqs5xCs9c0p7cTt3W5GE3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCYMzSXbWpMGeIBqlLrnzxF5D+BDQDU5NfAwUZfZyDw7gIhALMX6HS9YiopbAKq7haZW4s4X84lmlr5U0Fte/j5ONMo"}],"unpackedSize":213458},"name":"past-dev","type":"module","engines":{"node":">=18"},"license":"MIT","scripts":{"test":"node --test tests/abandon.test.mjs tests/agent.test.mjs tests/api.test.mjs tests/browser.test.mjs tests/claim-state.test.mjs tests/claim.test.mjs tests/cli.test.mjs tests/commands.test.mjs tests/config.test.mjs tests/env-file.test.mjs tests/git.test.mjs tests/init.test.mjs tests/output.test.mjs tests/package.test.mjs tests/plugin-config.test.mjs tests/plugins.test.mjs tests/secrets.test.mjs tests/status.test.mjs tests/waiter.test.mjs","typecheck":"tsc --noEmit -p tsconfig.json"},"version":"0.2.0","_npmUser":{"name":"louis.tissot","email":"louis@revo.ai"},"homepage":"https://past.dev","keywords":["past","memory","api","agents","cli"],"repository":{"url":"git+https://github.com/Iteration-X/past.git","type":"git","directory":"cli"},"_npmVersion":"11.9.0","description":"The command line for past.dev, a long-term memory API for AI agents: make a project with no account and claim it, send data points to memory, and recall them.","directories":{},"maintainers":[{"name":"louis.tissot","email":"louis@revo.ai"}],"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"18.19.130"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/past-dev_0.2.0_1795539514952_0.7902559062803455"}}},"time":{"created":"2026-11-09T13:01:16.669Z","modified":"2026-11-24T16:58:35.243Z","0.0.0-stage":"2026-11-09T13:01:16.669Z","0.1.0":"2026-11-09T13:02:33.743Z","0.2.0":"2026-11-24T16:58:35.053Z"},"bugs":{"email":"support@past.dev"},"license":"MIT","homepage":"https://past.dev","keywords":["past","memory","api","agents","cli"],"repository":{"url":"git+https://github.com/Iteration-X/past.git","type":"git","directory":"cli"},"description":"The command line for past.dev, a long-term memory API for AI agents: make a project with no account and claim it, send data points to memory, and recall them.","maintainers":[{"name":"louis.tissot","email":"louis@revo.ai"}],"readme":"# past-dev\n\nThe command line for [past.dev](https://past.dev), memory for AI agents and apps. Make a\npast.dev project with no account and claim it later, send data points, wait until they are\nprocessed, recall what past.dev holds about a question, and install the past.dev plugin for every\ncoding agent on the machine, from a terminal or from a coding agent.\n\n```sh\nnpx -y past-dev@latest init\nnpx -y past-dev@latest ingest \"Renewal moved to March 12, 2026 per Dana.\" \\\n  --timestamp 2026-01-08T09:14:00Z --identity dana@example.com\nnpx -y past-dev@latest ingestion <ingestionId> --wait\nnpx -y past-dev@latest recall \"When is the renewal?\" --identity dana@example.com\nnpx -y past-dev@latest claim\n```\n\nIt needs Node.js 18 or later and installs nothing beside itself. `npm install -g past-dev` gives\nyou the same commands as `past-dev` and `past`.\n\n## Start with no account\n\n`init` makes an unclaimed past.dev project and writes its key where your code reads it, so\nneither you nor your coding agent handles the key. The project works at once like a new Pay as you\ngo account, with the credits a sign-up gets, and becomes yours when you claim it by signing in. A\nproject nobody claims is deleted with everything in it 7 days after it was made, whether it was\nused or not. `init` ends on a warning that gives that date and the claim command, `status` gives\nthe time left, and every answer the API sends to the project's key carries the date in its\n`X-Past-Unclaimed-Until` header.\n\nFor an app, run `init` in the folder of the server code that calls past.dev. The key goes into the\nenv file the framework loads, as `PAST_API_KEY`: `.env.local` for Next.js, `.env` for every other\nserver and for anything unknown, `.env.local` when git tracks `.env`. `init` adds the env file and\nthe `.past/` folder to `.gitignore` and checks with git that both are ignored. It stops, and makes\nno project, when a key is set already, when the app runs only in a browser or on a phone, or when\ngit would take the key into a commit.\n\nFor your own coding sessions, run `init --for coding-agent --identity <your email>`. The key goes\ninto `~/.past/config.json`, the file the past.dev plugins read, with recall and sending off until\nthe claim: the plugins send every past session at once, and that history waits until you own the\nproject.\n\nThen `claim`. On your computer it opens the claim page in your browser; you sign in or sign up and\napprove, the page hands the approval to the command, and the claim finishes by itself. Where no\nbrowser can open (a cloud sandbox, SSH, or `--no-browser`), it prints a link to open on any device;\nafter you approve, the page shows a code, and `claim --code <code>` finishes the claim. Either way\nthe claim needs the claim token that `init` kept on this machine: a link seen by someone else\nclaims nothing. Once claimed, the project, its key and its data are yours, and for coding sessions\nrecall and sending are on.\n\n`abandon` ends an unclaimed project before its date and removes what `init` wrote.\n\n## Install the plugins for your coding agents\n\n```sh\nnpx -y past-dev@latest plugins\n```\n\n`plugins` finds the coding agents on this machine and installs the past.dev plugin for each one,\nwith the agent's own commands. It shows you the exact commands first and runs them after you type\n`yes`. Then connect once, with the connect command it prints: every past.dev plugin reads the same\n`~/.past/config.json`.\n\n## The key\n\nEvery command except `init`, `claim` and `abandon` uses a project key, which starts with `past_sk_`.\n`init` writes one; with an account, create one in the console at [app.past.dev](https://app.past.dev),\nunder Build › API keys.\n\nThe CLI never takes the key as an option, because a key on a command line stays in your shell\nhistory. It uses the first key it finds:\n\n1. `PAST_API_KEY` in the environment.\n2. A `PAST_API_KEY=` line in `.env.local`, `.env.development.local`, `.env.development` or `.env`,\n   in that order, in the folder you run it in. Commented lines and empty values are skipped.\n3. `apiKey` in `~/.past/config.json`, the file the past.dev plugins for coding agents share.\n\n## Commands\n\n### init\n\n```sh\npast-dev init [--for app|coding-agent] [--identity <id>] [--dir <path>]\n              [--env-file <path>] [--agent claude-code|codex|cursor|other] [--fresh]\n```\n\nMakes an unclaimed project, or picks up the one that waits for its claim here, and writes its key.\n\n| Option | Meaning |\n|---|---|\n| `--for` | `app` (the default): the key goes into an env file of the project. `coding-agent`: into `~/.past/config.json` |\n| `--identity` | with `--for coding-agent`: the email or name your sessions' memories are attributed to |\n| `--dir` | the project folder, when it is not the folder you run in |\n| `--env-file` | the env file to write, as a path inside the project folder, such as `server/.env` |\n| `--agent` | the coding agent that runs `init`; read from its environment when left out |\n| `--fresh` | ends the project that waits for its claim and makes a new one |\n\n### claim\n\n```sh\npast-dev claim [--no-browser] [--code <code>] [--dir <path>]\n```\n\nStarts the claim, or waits on the one in progress, or finishes it with the code the claim page\nshowed. A coding agent's run waits 90 seconds at most; run it again to keep waiting, which opens no\nsecond page.\n\n### status\n\n```sh\npast-dev status [--dir <path>]\n```\n\nShows whether the project is unclaimed or owned, how the claim stands, and, while nobody owns it,\nits deletion date and the time left, with a warning that says so when less than 24 hours are left.\n\n### abandon\n\n```sh\npast-dev abandon [--dir <path>]\n```\n\nEnds the unclaimed project on past.dev, which refuses its key from then on, and removes the key\nline or the config fields `init` wrote (only while they hold the key `init` wrote) and the claim\nfile. `.gitignore` keeps its lines.\n\n### ingest\n\n```sh\npast-dev ingest <text|-> [--id <id>] [--timestamp <time>] [--label <label>]\n                [--audience <slug>] [--identity <id>]\n```\n\nSends one data point with `POST /api/v1/ingest`. With `-` as the text, it reads the text from\nstandard input: `cat notes.txt | past-dev ingest - --label \"Weekly sync\"`.\n\n| Option | API field | Meaning |\n|---|---|---|\n| `--id` | `id` | your own id for the data point; a later send with the same id is a new version of it |\n| `--timestamp` | `timestamp` | when it happened, such as `2026-01-08T09:14:00Z`; history sent today lands on its own dates |\n| `--label` | `label` | a short title, returned with the sources at recall |\n| `--audience` | `audience` | the slug of one of the project's audiences, who may read it; without it, every identity of the project may |\n| `--identity` | `identity` | your id for the person or agent who wrote it |\n\nIt prints the ingestion id to wait on. Processing takes a moment, and recall finds nothing of a\nsend before it completes.\n\n### ingestion\n\n```sh\npast-dev ingestion <ingestionId> [--wait] [--timeout <seconds>]\n```\n\nReads where one send got to with `GET /api/v1/ingest/{ingestionId}`: processing, completed or\nfailed. With `--wait` it reads again every 2 seconds until the send completes or fails, for at\nmost 120 seconds, or the `--timeout` you give.\n\n### recall\n\n```sh\npast-dev recall <query> --identity <id> [--limit <n>] [--max-tokens <n>]\n```\n\nAsks `POST /api/v1/recall` what past.dev holds about a question, as the identity that asks: a\nrecall returns only what that identity may read. It prints each result's rank, the date it\nhappened and its content:\n\n```text\n[1] 2026-01-08 Renewal moved to March 12, 2026 per Dana.\n```\n\n`--limit` caps the number of results (1 to 200), and `--max-tokens` the size of the evidence.\n\n### plugins\n\n```sh\npast-dev plugins [--agent claude-code|codex|copilot|devin|cursor] [--yes] [--dry-run]\n```\n\nInstalls the past.dev plugin for each coding agent it finds. An agent is found when its program is\non the `PATH`.\n\n| Agent | Program | Commands it runs |\n|---|---|---|\n| Claude Code | `claude` | `claude plugin marketplace add pastdotdev/claude-code-plugin`, then `claude plugin install pastdotdev@pastdotdev` |\n| Codex | `codex` | `codex plugin marketplace add pastdotdev/codex-plugin`, then `codex plugin add past@past` |\n| GitHub Copilot CLI | `copilot` | `copilot plugin marketplace add pastdotdev/copilot-plugin`, then `copilot plugin install past@past` |\n| Devin | `devin` | `devin plugins install pastdotdev/devin-plugin#plugins/past --yes` |\n| Cursor | `cursor`, or a `~/.cursor` folder | none: Cursor installs a plugin from its Customize screen, and `plugins` prints that step |\n\n| Option | Meaning |\n|---|---|\n| `--agent` | install for this agent only; give it once for each agent, or as a list with commas |\n| `--yes` | run the commands without the question |\n| `--dry-run` | print the agents found and the commands, and run nothing; `--print` does the same |\n\nNothing runs before you agree. At a terminal, `plugins` prints the commands and asks; type `yes` to\nrun them. A coding agent, a script or `--json` gets no question: without `--yes` the commands are\nprinted and the run ends with exit 11, so that an agent shows them to you first.\n\nEach agent gets one line: `installed`, `already installed` (Claude Code says so), `failed` with the\nagent's exit code and the command to run by hand, or `skipped` when the agent is not on this\nmachine. An agent that fails does not stop the others, and the run then ends with exit 1. The CLI\nnever prints what an agent's program wrote; to read an agent's own message, run the command it\nnames. A command has 180 seconds to finish. Claude Code's commands get `--json` where its version\ntakes it, so the CLI reads the result and not only the exit code.\n\n`plugins` writes no key and connects nothing. It ends with the next step in each agent: Codex asks\nyou to trust the plugin's hooks with `/hooks`, and each plugin has a connect command that takes a\nproject key and your identity. When `~/.past/config.json` holds a key already, no connect is\nneeded. On Windows an agent is found as `<program>.exe`.\n\n## Output\n\n`--json` prints `{\"result\": ...}` with the command's result, or `{\"error\": ...}` with the outcome,\na message, and the API's status and error code (for `plugins`, each agent's state under `agents`). Without it, results go to standard output, and\nproblems to standard error as one line that starts with the outcome, such as `key-exists:` or\n`needs-network:`, which a coding agent can act on.\n\nEvery message is a fixed sentence that names what happened and what to do. The CLI never prints a\nsentence it received from the server, and never a key, a claim token, the claim page's secret or a\nclaim code: anything shaped like a past.dev key or token is printed as `[redacted]`.\n\n`--mode agent` prints plain lines and bounds `init` and the wait for a claim at 90 seconds. It is\non when a coding agent runs the CLI (Claude Code, Codex, Cursor) or when standard output is no\nterminal; `--mode human` turns it off.\n\n## Files\n\n`init` writes the env file it names (or `~/.past/config.json`), appends to `.gitignore`, and keeps\nthe claim token in `.past/claim.json` (`~/.past/claim.json` for coding sessions), private to you.\nNever commit, print or paste that file: the token claims the project. The CLI never writes a file\ngit tracks, a symbolic link, `package.json`, a lockfile or source code. `plugins` writes no file\nitself: each agent's program keeps its plugins in its own configuration.\n\n## Environment\n\n| Variable | Use |\n|---|---|\n| `PAST_API_KEY` | the project key, read before the env files and the config file |\n| `PAST_API_URL` | the API's address, for a self-hosted deployment; `https://api.past.dev` by default. Plain `http` is allowed only to this machine (`localhost`, `127.0.0.1`, `::1`), since the key travels with every call |\n| `PAST_CLI_MODE` | `agent` or `human`, as `--mode` |\n| `BROWSER` | the program that opens the claim page, when set |\n\nA key read from `~/.past/config.json` goes to the `apiUrl` that file holds, when it holds one. The\nCLI also reads, to decide and never to change: `PATH` (which coding agents `plugins` finds; each\nagent's program runs with the CLI's own environment), `CLAUDECODE`, `CODEX_THREAD_ID`, `CODEX_SANDBOX` and\n`CURSOR_AGENT` (which agent runs it), `CODEX_SANDBOX_NETWORK_DISABLED` (no network here),\n`SSH_CONNECTION`, `SSH_TTY`, `DISPLAY` and `WAYLAND_DISPLAY` (whether a browser can open), and\n`PAST_HOME` (`init --for coding-agent` stops when it points away from `~/.past`).\n\n## Exit codes\n\n| Code | Meaning |\n|---|---|\n| 0 | done; in code mode, the claim link is printed |\n| 1 | the call failed: a server error, an answer the CLI cannot read, a claim page outside the deployment's console, no credits left, an archived project, a failed ingestion, a plugin install that failed (`plugin-install-failed`) |\n| 2 | the command cannot run as written: an unknown command or option, a missing argument, no key, an address the CLI refuses, a wrong claim code, no claim here, no coding agent to install for (`no-agent`) |\n| 3 | `has-account`: the account that signed in already has a past.dev organization; run `abandon` |\n| 4 | `gone`: the project or the claim link was deleted or expired, or past.dev refused the key |\n| 5 | `key-exists`: a key is set already, so `init` made no project |\n| 6 | `rate-limited` or `paused`: a limit, or no projects without an account for now |\n| 7 | `needs-network`, or a sandbox refused a write |\n| 8 | a refused write: `tracked-env-file`, `tracked-config`, `not-ignored`, `symlink`, `git-missing`, `home-directory`, `browser-only-app`, `past-home` |\n| 9 | `claim-required`: the call waits for a person to claim the project |\n| 10 | `declined`: the claim was declined in the browser |\n| 11 | `not-confirmed`: `plugins` printed its commands and ran none; run it with `--yes` once the person agrees |\n| 75 | `pending`: still preparing the project, still waiting for the approval, or an ingestion still processing |\n\n## More\n\nThe API reference is at [past.dev/docs](https://past.dev/docs), and the whole contract is\nmachine-readable at [past.dev/openapi.json](https://past.dev/openapi.json).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}