Documentation Index
Fetch the complete documentation index at: https://supermemory.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
@supermemory/bash is the SMFS idea wrapped as a single agent tool: run_bash(command). The “filesystem” is your Supermemory container. Runs anywhere TypeScript runs. Cloudflare Workers, AWS Lambda, Vercel, Node, the browser. No mount, no FUSE, no local disk.
Reach for the Bash Tool when your agent runs somewhere it can’t mount a real filesystem.
Install
Quickstart
createBash returns:
bash: the instance with.exec(cmd)toolDescription: a pre-written tool description ready to hand to the modelconfigureMemoryPaths(paths): scope which paths get extracted into Supermemoryrefresh(): re-prime the path index after external writes
Use it as a model tool
Vercel AI SDK
Anthropic SDK
OpenAI SDK
Memory
The Bash Tool inherits SMFS memory semantics. By default, files nameduser.md or memory.md are extracted as memories. Configure additional memory paths after construction:
/ matches recursively. No slash matches an exact file. Pass [] to disable memory generation.
The container also exposes a virtual profile.md at the root: a live digest of everything in the container. Read it once at the start of a session to give the model context without walking every file.
Commands the agent can run
Standard Unix surface, plus one custom command. Each does what you’d expect.Filesystem
pwd: print working directorycd: change directoryls,ls -la: listcat: read a filestat: file metadatamkdir: create directoryrm,rm -rf: deletermdir: delete empty directorymv: move or renamecp: copyecho: write or append (echo "x" > file,echo "x" >> file)
Search and text
grep: literal substring match against a known pathsgrep <query> [path]: semantic search across the container. Trailing/on path scopes to a directory. No path searches everything.find: search by name or propertieshead,tail: first or last N lineswc: word, line, byte countssort: sort linessed,awk: text transformation
Shell features
- Pipes (
|) - Redirects (
>,>>) - Conditionals (
&&,||) - Loops (
for,while) - File tests (
[ -f ],[ -d ],[ -e ])
Configuration
| Option | Default | Purpose |
|---|---|---|
apiKey | required | Supermemory API key |
containerTag | required | Container to expose as the filesystem |
baseURL | SDK default | Override the API endpoint |
eagerLoad | true | Warm the path index when the instance starts |
eagerContent | true | Also warm the content cache during eager load |
cacheTtlMs | 150_000 | Content cache TTL in ms. null = never expires (single-writer). 0 = no cache. |
customCommands, logger, plus just-bash pass-throughs like executionLimits, network, python, javascript, cwd, env) exist but aren’t part of the supported surface for the SMFS use case. The container is what defines the filesystem; setting cwd or extra env from the host doesn’t change that.
Limitations
chmod,utimes, and symlinks (ln -s,readlink) throwENOSYS./dev/nullas a redirect target isn’t supported. Write to/tmp/discard.loginstead.- Binary uploads aren’t supported. Text is extracted server-side.