Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.5.9] - 2026-02-02

### Changed

- 模板重构:`demoTool` 的 `invoke` 方法改为使用结构化的 `ToolArgs` 接口,提升类型安全性

## [0.5.8] - 2026-02-02

### Added
Expand Down Expand Up @@ -211,7 +217,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- Code quality checks with Biome.
- Automated release workflow via GitHub Actions.

[Unreleased]: https://github.com/choice-open/atomemo-plugin-cli/compare/v0.5.8...HEAD
[Unreleased]: https://github.com/choice-open/atomemo-plugin-cli/compare/v0.5.9...HEAD
[0.5.9]: https://github.com/choice-open/atomemo-plugin-cli/compare/v0.5.8...v0.5.9
[0.5.8]: https://github.com/choice-open/atomemo-plugin-cli/compare/v0.5.7...v0.5.8
[0.5.7]: https://github.com/choice-open/atomemo-plugin-cli/compare/v0.5.6...v0.5.7
[0.5.6]: https://github.com/choice-open/atomemo-plugin-cli/compare/v0.5.5...v0.5.6
Expand Down
189 changes: 189 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,52 @@ USAGE
* [`atomemo help [COMMAND]`](#atomemo-help-command)
* [`atomemo version`](#atomemo-version)

## `atomemo auth login`

Uses device authorization flow to login with your Choiceform account by following these steps:

```
USAGE
$ atomemo auth login

DESCRIPTION
Uses device authorization flow to login with your Choiceform account by following these steps:

1. Request a validation code automatically
2. Show the validation code and a verification URL to the user
3. Open the verification URL in the user's browser and paste the verification code
4. Submit the validation code to complete the device authorization flow

EXAMPLES
Login by using device authorization flow

$ atomemo auth login
```

_See code: [src/commands/auth/login.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/auth/login.ts)_

## `atomemo auth status`

Display the current authentication status.

```
USAGE
$ atomemo auth status

DESCRIPTION
Display the current authentication status.

Shows user information and session details if authenticated,
or prompts to login if not yet authenticated.

EXAMPLES
Check current authentication status

$ atomemo auth status
```

_See code: [src/commands/auth/status.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/auth/status.ts)_

## `atomemo autocomplete [SHELL]`

Display autocomplete installation instructions.
Expand Down Expand Up @@ -119,6 +165,149 @@ DESCRIPTION

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_

## `atomemo plugin checksum [FILE]`

describe the command here

```
USAGE
$ atomemo plugin checksum [FILE] [-f] [-n <value>]

ARGUMENTS
[FILE] file to read

FLAGS
-f, --force
-n, --name=<value> name to print

DESCRIPTION
describe the command here

EXAMPLES
$ atomemo plugin checksum
```

_See code: [src/commands/plugin/checksum.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/plugin/checksum.ts)_

## `atomemo plugin init`

Initialize a new plugin with step-by-step interactive instructions.

```
USAGE
$ atomemo plugin init [-i] [-n my-awesome-plugin] [-d Descriptive text...]
[-u <value>] [-l elixir|python|typescript]

FLAGS
-d, --description=Descriptive text... Short description
-i, --[no-]interactive Use interactive mode (by default)
-l, --language=<option> Programming language to use for plugin development
<options: elixir|python|typescript>
-n, --name=my-awesome-plugin Plugin name
-u, --url=<value> Repository URL

DESCRIPTION
Initialize a new plugin with step-by-step interactive instructions.

Providing required flags skips interactive flow and completes initialization in one go.

EXAMPLES
Start with interactive initialization:

$ atomemo plugin init
```

_See code: [src/commands/plugin/init.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/plugin/init.ts)_

## `atomemo plugin pack [FILE]`

describe the command here

```
USAGE
$ atomemo plugin pack [FILE] [-f] [-n <value>]

ARGUMENTS
[FILE] file to read

FLAGS
-f, --force
-n, --name=<value> name to print

DESCRIPTION
describe the command here

EXAMPLES
$ atomemo plugin pack
```

_See code: [src/commands/plugin/pack.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/plugin/pack.ts)_

## `atomemo plugin permission [FILE]`

describe the command here

```
USAGE
$ atomemo plugin permission [FILE] [-f] [-n <value>]

ARGUMENTS
[FILE] file to read

FLAGS
-f, --force
-n, --name=<value> name to print

DESCRIPTION
describe the command here

EXAMPLES
$ atomemo plugin permission
```

_See code: [src/commands/plugin/permission.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/plugin/permission.ts)_

## `atomemo plugin refresh-key`

Refresh or create API Key for plugin debugging in development stage.

```
USAGE
$ atomemo plugin refresh-key

DESCRIPTION
Refresh or create API Key for plugin debugging in development stage.

EXAMPLES
$ atomemo plugin refresh-key
```

_See code: [src/commands/plugin/refresh-key.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/plugin/refresh-key.ts)_

## `atomemo plugin run [FILE]`

describe the command here

```
USAGE
$ atomemo plugin run [FILE] [-f] [-n <value>]

ARGUMENTS
[FILE] file to read

FLAGS
-f, --force
-n, --name=<value> name to print

DESCRIPTION
describe the command here

EXAMPLES
$ atomemo plugin run
```

_See code: [src/commands/plugin/run.ts](https://github.com/choice-open/atomemo-plugin-cli/blob/v0.5.9/src/commands/plugin/run.ts)_

## `atomemo version`

```
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@choiceopen/atomemo-plugin-cli",
"version": "0.5.8",
"version": "0.5.9",
"description": "A command-line utility for building and publishing Choiceform Atomemo Plugin.",
"keywords": [
"oclif"
Expand Down
9 changes: 7 additions & 2 deletions src/templates/typescript/src/tools/demo.ts.eta
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import type { ToolDefinition } from "@choiceopen/atomemo-plugin-sdk-js/types"
import { t } from "../i18n/i18n-node"

interface ToolArgs {
parameters: { location: string }
credentials: Record<string, { api_key: string }>
}

export const demoTool = {
name: "demo-tool",
display_name: t("DEMO_TOOL_DISPLAY_NAME"),
Expand All @@ -21,9 +26,9 @@ export const demoTool = {
},
},
],
async invoke({ args }: { args: { location: string } }) {
async invoke({ args }: { args: ToolArgs }) {
return {
message: `Testing the plugin with location: ${args.location}`,
message: `Testing the plugin with location: ${args.parameters.location}`,
}
},
} satisfies ToolDefinition