@hasna/files weekly downloads statistics
By hasna (9 listings) · npm · MCP servers
Agent-first file management — index local folders and S3 buckets, sync Google Drive, tag, search, and retrieve files via CLI + MCP
@hasna/files has 6,207 recorded weekly downloads on npm, a decrease of 30.3% over the past 30 days, ranking #1450 of 3,247 tracked listings.
About @hasna/files
@hasna/files
Agent-first file management — index local folders and S3 buckets, sync Google Drive, tag, search, and retrieve files via CLI + MCP
Install
bun install -g @hasna/files
The published executables use Bun. The client talks to the hosted files
service through the ONE @hasna/contracts credential resolver, resolved fresh
on every request: the macOS Keychain item
hasna.credentials.files.api-key (account HASNA_STATION, else the short
hostname, else $USER), the disk credential file
~/.hasna/files/config/credentials (owner-only 0400/0600), or
HASNA_FILES_API_KEY. The service authority follows the same ladder —
HASNA_FILES_API_URL, the Keychain api-url item, the credentials file — and
defaults to the fleet gateway https://api.hasna.com/files once a
credential resolves, so a key alone is a complete configuration. The
unprefixed FILES_API_URL / FILES_API_KEY names survive only as a silent
alias inside the resolver for one release; the canonical HASNA_FILES_* names
work and win.
Without any resolvable credential the CLI fails closed — non-zero exit, no
SQLite, no *-local-fallback event. Local SQLite mode is an explicit opt-in:
set HASNA_FILES_LOCAL=1 (alias FILES_LOCAL=1), and no credential or
PostgreSQL/S3 configuration is required for local folders. Every local run
prints one files: LOCAL mode — ... line on stderr so an unhosted run is never
mistaken for an empty hosted one. The retired HASNA_FILES_LOCAL_MODE /
FILES_LOCAL_MODE / *_STORAGE_MODE switches are gone, and nothing reads
~/.hasna/fleet-env, ~/.hasna/cloud, ~/.config/hasna or
$XDG_CONFIG_HOME.
export HASNA_FILES_LOCAL=1 # explicit opt-in for the local SQLite store
files sources add ~/Documents --name documents
files index
files search "quarterly plan"
Documentation
- CLI reference
- MCP server and tool catalog
- HTTP service, client modes, migrations, and SDK
- Evidence storage contract
- Knowledge source contract
CLI Usage
files --help
files sources --help
files knowledge manifest --help
The CLI supports local SQLite mode (explicit opt-in: HASNA_FILES_LOCAL=1
/ FILES_LOCAL=1) and a hosted HTTP API mode. With neither a resolvable
credential nor the local opt-in set, commands fail closed with an error naming
every credential tier the resolver consulted — never a silent local session.
Commands that need on-box bytes or ingestion state fail explicitly in API
mode; the complete command and availability matrix is in the CLI
reference.
Build bounded agent context packs with citations instead of dumping full files:
files context-pack f_abc123 --max-total-chars 6000
files context-pack --source-ref open-files://source/src_abc/path/Notes%2Fbrief.md
files search-pack "supplier renewal" --max-files 5 --max-excerpts 12
files search-pack "loop receipt" --out ./context-pack.json --dry-run
Context packs print compact deterministic JSON with attachment_refs, citations,
bounded excerpts, and omitted counts. Secret-like values are redacted by
default; repeat --redact <regex> for local policy patterns. Use --out to
write the bounded pack as a local artifact and print a compact pointer.
Google Drive Sync
Google Drive sync uses profiles configured through the connectors CLI:
connectors auth googledrive
Add or repair your S3 destination once. This stores the AWS named profile on
the source and sets it as the default Google Drive destination. This package
ships no default bucket or AWS profile — set HASNA_FILES_S3_BUCKET (and
optionally HASNA_FILES_AWS_PROFILE) or pass --bucket/--aws-profile
explicitly:
export HASNA_FILES_S3_BUCKET=<your-bucket>
files sources bootstrap-prod-files
files sources add-google-drive --all-profiles --all
files sources sync-google-drive --dry-run
files sources sync-google-drive
bootstrap-prod-files (aliased bootstrap-prod-emails) creates or updates a
single canonical S3 source rooted at s3://<bucket>/imports/google-drive/live
and sets it as the default Google Drive destination; new imports land below
that root under <profile>/.... The --aws-profile flag defaults to the
standard AWS SDK default profile (or HASNA_FILES_AWS_PROFILE if set) —
never a hardcoded profile name. Operator-specific bucket names, legacy bucket
aliases, and migration runbooks are internal evidence and are not shipped in
the public package.
For a custom S3 destination, pass the shared AWS profile explicitly:
files sources add s3://my-files-bucket/google-drive --region us-east-1 --aws-profile files-sync
To sync into local storage instead, add a local source and pass it as the destination:
files sources add ~/Files/google-drive-imports --name drive-local
files sources add-google-drive --profile personal --all --destination-source <local-source-id>
Google Drive rows retain their Drive source identity while the resolver follows
the configured S3 or local destination for bytes. Use files resolve or
files download for those stored copies. files where is limited to files
whose source itself is local.
To organize the migrated Google Drive corpus into the unified files taxonomy, run the policy command as a dry-run first:
files organize apply-drive-policy --json
files organize apply-drive-policy --apply
This updates review metadata only: owner, normalized virtual target path,
duplicate status, and broad additive permission metadata. Canonical S3 objects
stay under objects/sha256/, and legacy/import buckets stay readable until the
final retirement audit.
MCP Server
files-mcp
```…
Description from the npm listing.
- files
- storage
- s3
- google-drive
- mcp
- ai
- coding-agent
- claude
- sqlite
- file-management
- cli
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm MCP servers plugins
All 20 @hasna/files alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@hasna/files. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.