Skip to content

Commit

Permalink
add config
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernRave committed Dec 13, 2024
1 parent 7bc97f2 commit efbe907
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i18n-magic",
"version": "0.9.3",
"version": "0.9.4",
"license": "MIT",
"description": "CLI to help you manage your locales JSON with translations, replacements, etc. with OpenAI",
"repository": {
Expand Down
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ import { loadConfig } from "./lib/utils"

const program = new Command()

require("dotenv").config()

program
.name("i18n-magic")
.description(
"CLI to help you manage your locales JSON with translations, replacements, etc. with OpenAI.",
)
.version("0.2.0")
.option("-c, --config <path>", "path to config file")
.option("-e, --env <path>", "path to .env file")

require("dotenv").config({
path: program.opts().env || ".env",
})

const commands: CommandType[] = [
{
Expand Down

0 comments on commit efbe907

Please sign in to comment.