bcdocker 1.0.0 → 1.0.2

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Oleksandr (Ciellos)
3
+ Copyright (c) 2026 bcdocker contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,165 +1,136 @@
1
- # bcd — BC Docker MCP Server & CLI
1
+ # bcdocker
2
2
 
3
- An MCP (Model Context Protocol) server and CLI for managing Business Central Docker containers. Lets AI assistants in Cursor, VS Code, or Claude Desktop directly manage your BC dev environments.
4
-
5
- ## Prerequisites
6
-
7
- - **Node.js 18+**
8
- - **Windows PowerShell 5.1** (BC management cmdlets require it)
9
- - **Docker Desktop** in Windows containers mode
10
- - **BCDocker PowerShell module** (the `PartnerScript/` sibling folder)
11
-
12
- ## Setup
3
+ MCP server and CLI for **Business Central Docker** container management. Run via `npx` -- no install needed.
13
4
 
14
5
  ```bash
15
- cd bcd
16
- npm install
17
- npm run build
6
+ npx bcdocker list # list containers
7
+ npx bcdocker create # create a BC sandbox
8
+ npx bcdocker test bcsandbox # run AL tests
18
9
  ```
19
10
 
20
- ## Usage: MCP Server
11
+ ## Quick start
12
+
13
+ ### As MCP server (AI assistants)
21
14
 
22
- ### Cursor
15
+ Zero-install -- add to your IDE config and your AI can manage BC containers directly:
23
16
 
24
- Add to your Cursor MCP settings (`.cursor/mcp.json` or workspace settings):
17
+ **Cursor** (`.cursor/mcp.json`):
25
18
 
26
19
  ```json
27
20
  {
28
21
  "mcpServers": {
29
22
  "bcd": {
30
- "command": "node",
31
- "args": ["C:/myspace/work/Mine/DockerUtils/bcd/dist/server.js"]
23
+ "command": "npx",
24
+ "args": ["-y", "bcdocker"]
32
25
  }
33
26
  }
34
27
  }
35
28
  ```
36
29
 
37
- ### Claude Desktop
38
-
39
- Add to `claude_desktop_config.json`:
30
+ **Claude Desktop** (`claude_desktop_config.json`):
40
31
 
41
32
  ```json
42
33
  {
43
34
  "mcpServers": {
44
35
  "bcd": {
45
- "command": "node",
46
- "args": ["C:/myspace/work/Mine/DockerUtils/bcd/dist/server.js"]
36
+ "command": "npx",
37
+ "args": ["-y", "bcdocker"]
47
38
  }
48
39
  }
49
40
  }
50
41
  ```
51
42
 
52
- ### VS Code (Copilot)
53
-
54
- Add to `.vscode/mcp.json`:
43
+ **VS Code / Copilot** (`.vscode/mcp.json`):
55
44
 
56
45
  ```json
57
46
  {
58
47
  "servers": {
59
48
  "bcd": {
60
49
  "type": "stdio",
61
- "command": "node",
62
- "args": ["C:/myspace/work/Mine/DockerUtils/bcd/dist/server.js"]
50
+ "command": "npx",
51
+ "args": ["-y", "bcdocker"]
63
52
  }
64
53
  }
65
54
  }
66
55
  ```
67
56
 
68
- After configuring, your AI assistant can:
57
+ Once configured, ask your AI assistant things like:
69
58
 
70
59
  - "List my BC containers"
71
- - "Create a new BC sandbox container with version 26.0"
60
+ - "Create a new BC sandbox with version 26.0"
72
61
  - "Show me the apps in bcsandbox"
73
62
  - "Run tests in my container"
74
- - "Compile and publish my AL project to bcsandbox"
75
- - "Stop the bcsandbox container"
63
+ - "Compile and publish my AL project"
76
64
 
77
- ## Usage: CLI
65
+ ### As CLI
78
66
 
79
- ```bash
80
- # List containers
81
- node dist/cli.js list
67
+ **Via npx (no install):**
82
68
 
83
- # Container details
84
- node dist/cli.js info bcsandbox
69
+ ```bash
70
+ npx bcdocker list
71
+ npx bcdocker info bcsandbox
72
+ npx bcdocker create --name bcsandbox --version 26.0 --country w1 --bypass-cdn
73
+ npx bcdocker start bcsandbox
74
+ npx bcdocker stop bcsandbox
75
+ npx bcdocker apps bcsandbox --publisher Microsoft
76
+ npx bcdocker test bcsandbox --codeunit 50100
77
+ ```
85
78
 
86
- # Create container
87
- node dist/cli.js create --name bcsandbox --version 26.0 --country w1 --bypass-cdn
79
+ **Global install** (puts `bcd` on your PATH):
88
80
 
89
- # Start / Stop / Restart
90
- node dist/cli.js start bcsandbox
91
- node dist/cli.js stop bcsandbox
92
- node dist/cli.js restart bcsandbox
81
+ ```bash
82
+ npm i -g bcdocker
83
+ bcd list
84
+ bcd create --name mybc --version 26.0
85
+ bcd test mybc
86
+ ```
93
87
 
94
- # Remove container
95
- node dist/cli.js remove bcsandbox
88
+ ## Prerequisites
96
89
 
97
- # Open web client
98
- node dist/cli.js open bcsandbox
90
+ - **Node.js 18+**
91
+ - **Windows PowerShell 5.1** (BC management cmdlets require it)
92
+ - **Docker Desktop** in Windows containers mode
99
93
 
100
- # List apps
101
- node dist/cli.js apps bcsandbox
102
- node dist/cli.js apps bcsandbox --publisher Microsoft
94
+ The npm package bundles the PowerShell module in `ps/`. Override with `BCD_MODULE_PATH` if needed.
103
95
 
104
- # Install .app file
105
- node dist/cli.js install bcsandbox "C:\apps\MyApp.app"
96
+ ## CLI commands
106
97
 
107
- # Compile and publish AL project
108
- node dist/cli.js publish bcsandbox "C:\Projects\MyApp"
98
+ | Command | Description |
99
+ |---|---|
100
+ | `list` / `ls` | List all BC containers with status |
101
+ | `info <container>` | Show version, status, and endpoints |
102
+ | `create` | Create a new BC container (5-30 min) |
103
+ | `remove <container>` | Remove a container |
104
+ | `start <container>` | Start a stopped container |
105
+ | `stop <container>` | Stop a running container |
106
+ | `restart <container>` | Restart a container |
107
+ | `open <container>` | Open BC Web Client in browser |
108
+ | `apps <container>` | List apps (optional `--publisher`) |
109
+ | `install <container> <appFile>` | Install a .app file |
110
+ | `uninstall <container> <app> <publisher>` | Uninstall an app |
111
+ | `publish <container> <folder>` | Compile and publish an AL project |
112
+ | `test [container]` | Run AL tests (optional `--codeunit`, `--function`, `--app`) |
113
+ | `toolkit <container>` | Import test toolkit (`--full` for all) |
114
+ | `license <container> <file>` | Import a license file |
109
115
 
110
- # Run tests
111
- node dist/cli.js test bcsandbox
112
- node dist/cli.js test bcsandbox --codeunit 50100
113
- node dist/cli.js test bcsandbox --app "C:\Projects\MyApp.Test"
116
+ ## MCP tools
114
117
 
115
- # Import test toolkit
116
- node dist/cli.js toolkit bcsandbox
117
- node dist/cli.js toolkit bcsandbox --full
118
+ The same 15 operations exposed as MCP tools for AI assistants:
118
119
 
119
- # Import license
120
- node dist/cli.js license bcsandbox "C:\license.bclicense"
121
- ```
120
+ `list-containers` `container-info` `create-container` `remove-container` `start-container` `stop-container` `restart-container` `open-webclient` `list-apps` `install-app` `uninstall-app` `publish-project` `run-tests` `import-test-toolkit` `import-license`
122
121
 
123
- ### Global install (optional)
122
+ ## Naming
124
123
 
125
- ```bash
126
- npm link
127
- # Now use 'bcd' directly:
128
- bcd list
129
- bcd create --name mybc --version 26.0
130
- bcd apps mybc
131
- ```
124
+ | Term | What it is |
125
+ |------|------------|
126
+ | **`bcdocker`** | This npm package and GitHub repo. |
127
+ | **`bcd`** | The CLI command after global install (`npm i -g bcdocker`). |
128
+ | **`bcdocker-toolkit`** | The PowerShell + Windows UI repo (module **BCDocker**). Different repo. |
132
129
 
133
- ## MCP Tools Reference
130
+ ## Related
134
131
 
135
- | Tool | Description |
136
- |---|---|
137
- | `list-containers` | List all BC containers with status |
138
- | `container-info` | Get version, status, and endpoints |
139
- | `create-container` | Create a new BC container (5-30 min) |
140
- | `remove-container` | Remove a container |
141
- | `start-container` | Start a stopped container |
142
- | `stop-container` | Stop a running container |
143
- | `restart-container` | Restart a container |
144
- | `list-apps` | List apps in a container |
145
- | `install-app` | Install a .app file |
146
- | `publish-project` | Compile and publish an AL project |
147
- | `import-test-toolkit` | Import test toolkit |
148
- | `import-license` | Import a license file |
149
- | `run-tests` | Run AL tests |
150
-
151
- ## Architecture
132
+ - **[bcdocker-toolkit](https://github.com/olederkach/bcdocker-toolkit)** -- PowerShell module and Windows UI for Business Central Docker containers
152
133
 
153
- ```
154
- bcd/
155
- ├── src/
156
- │ ├── server.ts # MCP server — exposes tools over stdio
157
- │ ├── cli.ts # CLI — same operations via command line
158
- │ └── executor.ts # PowerShell 5.1 execution layer
159
- ├── dist/ # Compiled JS (after npm run build)
160
- ├── package.json
161
- ├── tsconfig.json
162
- └── README.md
163
- ```
134
+ ## License
164
135
 
165
- The MCP server and CLI both call through `executor.ts`, which spawns `powershell.exe` (5.1, not pwsh 7.x) and imports the `BCDocker.psm1` module from the sibling `PartnerScript/` folder. This ensures all the BcContainerHelper cmdlets work correctly, including on BC 28+.
136
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import { resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { runCli } from "./cli.js";
5
+ const isMainModule = process.argv[1] &&
6
+ resolve(fileURLToPath(import.meta.url)) === resolve(process.argv[1]);
7
+ if (isMainModule) {
8
+ runCli(process.argv).catch((err) => {
9
+ console.error("Error:", err.message);
10
+ process.exit(1);
11
+ });
12
+ }
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,5 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ import { Command } from "commander";
3
+ /** Builds the CLI (exported for tests). */
4
+ export declare function createCliProgram(): Command;
5
+ export declare function runCli(argv: string[]): Promise<void>;