Skip to content

Commit 156265a

Browse files
committed
feat: init
0 parents  commit 156265a

28 files changed

+10609
-0
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/tmp

.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["oclif", "oclif-typescript", "prettier", "plugin:jsdoc/recommended"],
3+
"rules": {
4+
"valid-jsdoc": "off",
5+
"no-warning-comments": "off",
6+
"unicorn/filename-case": "off",
7+
"perfectionist/sort-classes": "off",
8+
"perfectionist/sort-imports": "off",
9+
"perfectionist/sort-objects": "off",
10+
"perfectionist/sort-union-types": "off",
11+
"perfectionist/sort-object-types": "off",
12+
"jsdoc/require-jsdoc": "off",
13+
"jsdoc/require-returns": "off",
14+
"jsdoc/require-param-description": "off",
15+
"jsdoc/require-param-type": "off",
16+
"@typescript-eslint/no-explicit-any": "off"
17+
}
18+
}

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
**/.DS_Store
2+
*-debug.log
3+
*-error.log
4+
/.idea
5+
/.nyc_output
6+
/dist
7+
/lib
8+
/tmp
9+
/yarn.lock
10+
node_modules
11+
oclif.lock
12+
oclif.manifest.json
13+
tsconfig.tsbuildinfo
14+
15+
examples

.mocharc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"require": [
3+
"ts-node/register"
4+
],
5+
"watch-extensions": [
6+
"ts"
7+
],
8+
"recursive": true,
9+
"reporter": "spec",
10+
"timeout": 60000,
11+
"node-option": [
12+
"loader=ts-node/esm",
13+
"experimental-specifier-resolution=node"
14+
]
15+
}

.prettierrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
experimentalTernaries: true
2+
semi: false
3+
singleQuote: true
4+
printWidth: 160

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Execute Command",
8+
"skipFiles": [
9+
"<node_internals>/**"
10+
],
11+
"program": "${workspaceFolder}/bin/dev.js",
12+
"args": [
13+
"hello",
14+
"world",
15+
],
16+
}
17+
]
18+
}

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [0.1.1](https://github.com/CodeGenieApp/cli/compare/0.1.0...0.1.1) (2024-03-02)
2+
3+
4+
### Bug Fixes
5+
6+
* release ([da5b7ab](https://github.com/CodeGenieApp/cli/commit/da5b7abe70b0a5737fc657654662eeb351f3b8bf))
7+
8+
9+
10+
# [0.1.0](https://github.com/CodeGenieApp/cli/compare/d8ec3c90024b3f86cf683326c638b3144bfcf1f1...0.1.0) (2024-03-01)
11+
12+
13+
### Bug Fixes
14+
15+
* add debug and other refactors ([7311f11](https://github.com/CodeGenieApp/cli/commit/7311f11f248d84de3933732ae89987bc6897de4a))
16+
* add logo.png to files ([c6f5063](https://github.com/CodeGenieApp/cli/commit/c6f5063e3f015b16e48207a1aaa1b8e35ebb3401))
17+
* app definition generator ([d839b2e](https://github.com/CodeGenieApp/cli/commit/d839b2ef3b28de61b44d8a2bc831c87df01b1794))
18+
* exit after generating description ([65877c2](https://github.com/CodeGenieApp/cli/commit/65877c20e42e53264fd16cfd3905f361a495da0c))
19+
* generate --description cwd ([b8440b6](https://github.com/CodeGenieApp/cli/commit/b8440b6544dad0e615163c837940f45825395e84))
20+
* minor improvements ([4169c83](https://github.com/CodeGenieApp/cli/commit/4169c83684557ba1e18d631e876f5233986e8650))
21+
* minor updates ([7d36ebe](https://github.com/CodeGenieApp/cli/commit/7d36ebe3bb2c76b2e7516c17dfcc640bf189ba0e))
22+
* remove plugins-plugin ([78c738e](https://github.com/CodeGenieApp/cli/commit/78c738e6e8dc6a8f6bbd6d074d8f48f850fc2495))
23+
* update readme ([bf74941](https://github.com/CodeGenieApp/cli/commit/bf749412847bf69c3667cff6af6c986172299cb4))
24+
25+
26+
### Features
27+
28+
* add idp flag; remove copyAwsProfile; add check for existing .codegenie directory ([7982355](https://github.com/CodeGenieApp/cli/commit/79823550bc38fb06715ea838da3b7ee2dd9e28bb))
29+
* init ([d8ec3c9](https://github.com/CodeGenieApp/cli/commit/d8ec3c90024b3f86cf683326c638b3144bfcf1f1))
30+
31+
32+

README.md

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# Code Genie CLI
2+
3+
```sh
4+
npx @codegenie/cli generate --description "An app that lets users upload photos, location, time, species and other information so that Wildlife Rescuers can get notified and respond to reports of injured wildlife in their area."
5+
```
6+
7+
<!-- toc -->
8+
* [Code Genie CLI](#code-genie-cli)
9+
* [Usage](#usage)
10+
* [Commands](#commands)
11+
* [Release](#release)
12+
<!-- tocstop -->
13+
14+
# Usage
15+
16+
<!-- usage -->
17+
```sh-session
18+
$ npm install -g @codegenie/cli
19+
$ @codegenie/cli COMMAND
20+
running command...
21+
$ @codegenie/cli (--version)
22+
@codegenie/cli/0.1.3 darwin-arm64 node-v20.11.0
23+
$ @codegenie/cli --help [COMMAND]
24+
USAGE
25+
$ @codegenie/cli COMMAND
26+
...
27+
```
28+
<!-- usagestop -->
29+
30+
# Commands
31+
32+
<!-- commands -->
33+
* [`@codegenie/cli autocomplete [SHELL]`](#codegeniecli-autocomplete-shell)
34+
* [`@codegenie/cli generate`](#codegeniecli-generate)
35+
* [`@codegenie/cli help [COMMANDS]`](#codegeniecli-help-commands)
36+
* [`@codegenie/cli login [FILE]`](#codegeniecli-login-file)
37+
* [`@codegenie/cli update [CHANNEL]`](#codegeniecli-update-channel)
38+
39+
## `@codegenie/cli autocomplete [SHELL]`
40+
41+
Display autocomplete installation instructions.
42+
43+
```
44+
USAGE
45+
$ @codegenie/cli autocomplete [SHELL] [-r]
46+
47+
ARGUMENTS
48+
SHELL (zsh|bash|powershell) Shell type
49+
50+
FLAGS
51+
-r, --refresh-cache Refresh cache (ignores displaying instructions)
52+
53+
DESCRIPTION
54+
Display autocomplete installation instructions.
55+
56+
EXAMPLES
57+
$ @codegenie/cli autocomplete
58+
59+
$ @codegenie/cli autocomplete bash
60+
61+
$ @codegenie/cli autocomplete zsh
62+
63+
$ @codegenie/cli autocomplete powershell
64+
65+
$ @codegenie/cli autocomplete --refresh-cache
66+
```
67+
68+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.0.5/lib/commands/autocomplete/index.ts)_
69+
70+
## `@codegenie/cli generate`
71+
72+
Generate an application
73+
74+
```
75+
USAGE
76+
$ @codegenie/cli generate [--json] [-n <value>] [-d <value>] [--deploy] [-p <value>] [-r]
77+
[--AppDefinitionOnly] [--idp <value>]
78+
79+
FLAGS
80+
-d, --description=<value> Describe your application in plain English and Code Genie will do its best to create
81+
an App Definition and data model for you.
82+
-n, --name=<value> Name of the app you're generating.
83+
-p, --awsProfileToCopy=<value> [default: default] The AWS Profile to copy in the ~/.aws/credentials file and used to
84+
deploy the application. Defaults to the 'default' profile. Specify --noCopyAwsProfile
85+
to skip this step
86+
-r, --replaceAppDefinition Replaces the current .codegenie directory.
87+
--deploy Deploys the generated application to AWS using the --awsProfileToCopy creds. Creates
88+
new profiles in ~/.aws/credentials based on your app name and stages by copying the
89+
--awsProfileToCopy creds.
90+
--generateAppDefinitionOnly Generates app definition only (run `@codegenie/cli generate` without `--description`
91+
to generate source code).
92+
--idp=<value>... Supported identity providers. Valid values include "Google" and "SAML". Can be
93+
specified multiple times to enable multiple IDPs.
94+
95+
GLOBAL FLAGS
96+
--json Format output as json.
97+
98+
DESCRIPTION
99+
Generate an application
100+
101+
Generate an application based on a description or a App Definition defined in .codegenie
102+
103+
ALIASES
104+
$ @codegenie/cli generate
105+
106+
EXAMPLES
107+
$ @codegenie/cli generate --description "A to-do list application called getitdone" --deploy
108+
generating app...
109+
$ @codegenie/cli generate --description "A banking app" --deploy
110+
generating app...
111+
```
112+
113+
_See code: [dist/commands/generate.ts](https://github.com/CodeGenieApp/cli/blob/v0.1.3/dist/commands/generate.ts)_
114+
115+
## `@codegenie/cli help [COMMANDS]`
116+
117+
Display help for @codegenie/cli.
118+
119+
```
120+
USAGE
121+
$ @codegenie/cli help [COMMANDS] [-n]
122+
123+
ARGUMENTS
124+
COMMANDS Command to show help for.
125+
126+
FLAGS
127+
-n, --nested-commands Include all nested commands in the output.
128+
129+
DESCRIPTION
130+
Display help for @codegenie/cli.
131+
```
132+
133+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.20/lib/commands/help.ts)_
134+
135+
## `@codegenie/cli login [FILE]`
136+
137+
describe the command here
138+
139+
```
140+
USAGE
141+
$ @codegenie/cli login [FILE] [-n <value>] [-f]
142+
143+
ARGUMENTS
144+
FILE file to read
145+
146+
FLAGS
147+
-f, --force
148+
-n, --name=<value> name to print
149+
150+
DESCRIPTION
151+
describe the command here
152+
153+
EXAMPLES
154+
$ @codegenie/cli login
155+
```
156+
157+
_See code: [dist/commands/login.ts](https://github.com/CodeGenieApp/cli/blob/v0.1.3/dist/commands/login.ts)_
158+
159+
## `@codegenie/cli update [CHANNEL]`
160+
161+
update the @codegenie/cli CLI
162+
163+
```
164+
USAGE
165+
$ @codegenie/cli update [CHANNEL] [-a] [--force] [-i | -v <value>]
166+
167+
FLAGS
168+
-a, --available See available versions.
169+
-i, --interactive Interactively select version to install. This is ignored if a channel is provided.
170+
-v, --version=<value> Install a specific version.
171+
--force Force a re-download of the requested version.
172+
173+
DESCRIPTION
174+
update the @codegenie/cli CLI
175+
176+
EXAMPLES
177+
Update to the stable channel:
178+
179+
$ @codegenie/cli update stable
180+
181+
Update to a specific version:
182+
183+
$ @codegenie/cli update --version 1.0.0
184+
185+
Interactively select version:
186+
187+
$ @codegenie/cli update --interactive
188+
189+
See available versions:
190+
191+
$ @codegenie/cli update --available
192+
```
193+
194+
_See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v4.1.7/dist/commands/update.ts)_
195+
<!-- commandsstop -->
196+
197+
# Release
198+
199+
```sh
200+
npm version (major|minor|patch) # bumps version, updates README, adds git tag
201+
npm publish --access=public
202+
```
203+
204+
See [Oclif Release Docs](https://oclif.io/docs/releasing/) for more details.

bin/dev.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
3+
node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*

bin/dev.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
2+
3+
// eslint-disable-next-line node/shebang
4+
async function main() {
5+
const {execute} = await import('@oclif/core')
6+
await execute({development: true, dir: import.meta.url})
7+
}
8+
9+
await main()

bin/run.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
3+
node "%~dp0\run" %*

bin/run.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
3+
async function main() {
4+
const {execute} = await import('@oclif/core')
5+
await execute({dir: import.meta.url})
6+
}
7+
8+
await main()

codegenie-cli.code-workspace

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {
8+
"editor.defaultFormatter": "esbenp.prettier-vscode"
9+
}
10+
}

logo.png

82.3 KB
Loading

0 commit comments

Comments
 (0)