@hasna/project 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,39 +13,70 @@ bun install -g @hasna/project
13
13
  ```bash
14
14
  # Register a project
15
15
  project create --name my-app --path /path/to/my-app
16
+ project create --name my-app # uses cwd as path
16
17
 
17
- # List projects
18
+ # List / search
18
19
  project list
19
20
  project list --status archived
20
-
21
- # Get details
22
- project get my-app
23
-
24
- # Open a project (cd into it)
25
- cd $(project open my-app)
26
-
27
- # Update metadata
21
+ project list --tags web,ts # AND filter
22
+ project list --json | jq '.[].path' # machine-readable
23
+
24
+ # Get / status
25
+ project get my-app # auto-detects from cwd
26
+ project get my-app --json
27
+ project status # all projects at a glance
28
+ project status my-app # single project detail
29
+ project recent # recently opened (with relative times)
30
+ project doctor # health-check all projects
31
+ project doctor my-app --fix # auto-repair what can be fixed
32
+ project stats # disk / sync totals
33
+ project stats my-app
34
+
35
+ # Modify
28
36
  project update my-app --description "My app" --tags "web,ts"
29
-
30
- # Archive / unarchive
37
+ project rename my-app my-app-v2 # updates slug + .project.json
38
+ project tag my-app infra cloud # add tags
39
+ project untag my-app cloud # remove a tag
31
40
  project archive my-app
32
41
  project unarchive my-app
33
42
 
43
+ # Open (cd into it)
44
+ cd $(project open my-app) # print path; auto-detects cwd
45
+ workon my-app # shell function — actually cd's
46
+ penv my-app # load project .env into shell
47
+ project env my-app # print export statements (eval)
48
+ project env my-app --list # list keys only
49
+
50
+ # Working directories (multi-machine / multi-repo)
51
+ project workdir add my-app /path/to/dir --label backend
52
+ project workdir list my-app
53
+ project workdir generate my-app # write CLAUDE.md + AGENTS.md
54
+ project workdir generate my-app --dry-run
55
+ project workdir remove my-app /path/to/dir
56
+
34
57
  # Import existing directories
35
58
  project import /path/to/existing-project
36
- project import-bulk /path/to/workspace # imports all subdirs
59
+ project import-bulk /path/to/workspace # imports all subdirs
60
+ project clone my-app /new/local/path # pull from S3 to new machine path
37
61
 
38
62
  # Sync to/from S3
39
63
  project update my-app --s3-bucket my-bucket
40
64
  project sync my-app
41
65
  project sync my-app --direction push
42
- project sync-all # sync all projects with S3 configured
66
+ project sync-all # sync all projects with S3 configured
67
+ project watch my-app # push changes live as you edit
68
+ project sync-log my-app # show sync history
43
69
 
44
70
  # Schedule auto-sync
45
71
  project schedule set --interval daily --direction both
46
72
  project schedule status
47
73
  project schedule remove
48
74
 
75
+ # Cloud sync (SQLite ↔ RDS PostgreSQL)
76
+ project cloud status
77
+ project cloud pull
78
+ project cloud push
79
+
49
80
  # Publish to GitHub
50
81
  project publish my-app --org hasnaxyz
51
82
  project unpublish my-app
@@ -54,9 +85,9 @@ project unpublish my-app
54
85
  project git my-app status
55
86
  project git my-app log --oneline -10
56
87
 
57
- # Shell completion
58
- eval "$(project completion)" # bash
59
- eval "$(project completion --shell zsh)" # zsh
88
+ # Shell completion (includes workon + penv functions)
89
+ eval "$(project completion)" # bash
90
+ eval "$(project completion --shell zsh)" # zsh
60
91
  ```
61
92
 
62
93
  ## MCP Server
@@ -78,20 +109,26 @@ Add to your Claude config:
78
109
  | Tool | Description |
79
110
  |------|-------------|
80
111
  | `projects_create` | Register a new project. Returns `workingDirectory` + `post_create_actions` |
81
- | `projects_list` | List projects, filter by status |
112
+ | `projects_list` | List projects, filter by `status` and/or `tags` |
82
113
  | `projects_get` | Get project by ID or slug. Returns `workingDirectory` |
83
114
  | `projects_update` | Update project metadata |
84
115
  | `projects_archive` | Archive a project |
85
- | `projects_open` | Get `workingDirectory` for a project |
116
+ | `projects_open` | Get `workingDirectory` for a project (also tracks `last_opened_at`) |
86
117
  | `projects_sync` | Sync to/from S3 (incremental, by file hash) |
87
118
  | `projects_sync_all` | Sync all active projects with S3 configured |
119
+ | `projects_sync_log` | List recent sync history |
88
120
  | `projects_link` | Store integration IDs (todos, mementos, conversations, files) |
89
121
  | `projects_import` | Import an existing directory as a project |
90
122
  | `projects_import_bulk` | Import all subdirectories of a path |
91
123
  | `projects_publish` | Create GitHub repo, add remote, push |
124
+ | `projects_workdir_add` | Add a working directory; optionally generate CLAUDE.md + AGENTS.md |
125
+ | `projects_workdir_list` | List all working directories for a project |
126
+ | `projects_workdir_generate` | Generate CLAUDE.md + AGENTS.md in working directories |
92
127
  | `projects_schedule_set` | Enable cron-based auto-sync |
93
128
  | `projects_schedule_status` | Get current schedule config |
94
- | `projects_sync_log` | List recent sync history |
129
+ | `projects_cloud_status` | Show RDS connection health |
130
+ | `projects_cloud_pull` | Pull from cloud PostgreSQL to local SQLite |
131
+ | `projects_cloud_push` | Push local SQLite to cloud PostgreSQL |
95
132
 
96
133
  ### projects_create response
97
134
 
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsEzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8rB9D"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8rB9D"}
package/dist/cli/index.js CHANGED
@@ -46400,6 +46400,15 @@ function timeAgo(iso) {
46400
46400
  const d2 = Math.floor(h2 / 24);
46401
46401
  return `${d2}d ago`;
46402
46402
  }
46403
+ function suppressSslWarnings() {
46404
+ const orig = process.emitWarning.bind(process);
46405
+ process.emitWarning = (msg, ...args) => {
46406
+ const text = typeof msg === "string" ? msg : msg.message;
46407
+ if (text?.includes("SSL modes"))
46408
+ return;
46409
+ return orig(msg, ...args);
46410
+ };
46411
+ }
46403
46412
  function requireProject(idOrSlug) {
46404
46413
  if (idOrSlug)
46405
46414
  return resolveProject(idOrSlug);
@@ -46947,6 +46956,7 @@ ${source_default.bold(r2.project.name)} ${source_default.dim(r2.project.slug)}`)
46947
46956
  const cloudCmd = cmd.command("cloud").description("Cloud sync \u2014 push/pull between local SQLite and RDS PostgreSQL");
46948
46957
  cloudCmd.command("status").description("Show cloud configuration and connection health").action(async () => {
46949
46958
  process.env["NODE_NO_WARNINGS"] = "1";
46959
+ suppressSslWarnings();
46950
46960
  const { getCloudConfig: getCloudConfig2, getConnectionString: getConnectionString2, PgAdapterAsync: PgAdapterAsync2 } = await Promise.resolve().then(() => (init_dist(), exports_dist));
46951
46961
  const config = getCloudConfig2();
46952
46962
  console.log(`mode: ${config.mode}`);
@@ -46966,7 +46976,7 @@ ${source_default.bold(r2.project.name)} ${source_default.dim(r2.project.slug)}`)
46966
46976
  cloudCmd.command("pull").description("Pull data from cloud PostgreSQL to local SQLite").option("--tables <tables>", "Comma-separated table names (default: all)").action(async (opts) => {
46967
46977
  console.log(source_default.dim("Pulling from cloud..."));
46968
46978
  try {
46969
- process.env["NODE_NO_WARNINGS"] = "1";
46979
+ suppressSslWarnings();
46970
46980
  const { syncPull: syncPull2, getCloudConfig: getCloudConfig2, getConnectionString: getConnectionString2, PgAdapterAsync: PgAdapterAsync2, SqliteAdapter: SqliteAdapter2 } = await Promise.resolve().then(() => (init_dist(), exports_dist));
46971
46981
  const config = getCloudConfig2();
46972
46982
  if (!config.rds?.host) {
@@ -46991,7 +47001,7 @@ ${source_default.bold(r2.project.name)} ${source_default.dim(r2.project.slug)}`)
46991
47001
  cloudCmd.command("push").description("Push local SQLite data to cloud PostgreSQL").option("--tables <tables>", "Comma-separated table names (default: all)").action(async (opts) => {
46992
47002
  console.log(source_default.dim("Pushing to cloud..."));
46993
47003
  try {
46994
- process.env["NODE_NO_WARNINGS"] = "1";
47004
+ suppressSslWarnings();
46995
47005
  const { syncPush: syncPush2, getCloudConfig: getCloudConfig2, getConnectionString: getConnectionString2, PgAdapterAsync: PgAdapterAsync2, SqliteAdapter: SqliteAdapter2 } = await Promise.resolve().then(() => (init_dist(), exports_dist));
46996
47006
  const { runPgMigrations: runPgMigrations2 } = await Promise.resolve().then(() => (init_pg_migrations(), exports_pg_migrations));
46997
47007
  const config = getCloudConfig2();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/project",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Project management CLI + MCP server for AI agents — register, sync, and open projects across machines",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",