Code Monkey home page Code Monkey logo

lobe-cli-toolbox's Introduction

Lobe CLI Toolbox

AI CLI Toolbox, enhancing git commit and i18n workflow efficiency

English ・ 简体中文Report Bug · Request Feature



🪀 CLI Tools

💌 Lobe Commit (中文)
CLI tool that leverages Langchain/ChatGPT to generate Gitmoji-based commit messages.

🌏 Lobe i18n (中文)
Automation tool for the i18n (internationalization) translation process, powered by ChatGPT. It supports features such as automatic splitting of large files, incremental updates, and customization options for the OpenAI model, API proxy, and temperature.

🔖 Lobe label (中文)
Automatically copy issues labels from template repo.

📦 Ecosystem

NAME REPO NPM DOWNLOAD
@lobehub/cli-ui packages/lobe-cli-ui
@lobehub/cli-shebang packages/lobe-cli-shebang

⌨️ Local Development

You can use Github Codespaces for online development:

Or clone it for local development:

$ git clone https://github.com/lobehub/lobe-cli-toolbox.git
$ cd lobe-cli-toolbox
$ bun install

🤝 Contributing

Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.

🔗 Links

More Products

  • 🤖 Lobe Chat - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
  • 🤯 Lobe Theme - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.

Credits


📝 License

Copyright © 2023 LobeHub.
This project is MIT licensed.

lobe-cli-toolbox's People

Contributors

actions-user avatar arvinxx avatar canisminor1990 avatar dependabot[bot] avatar lsaudon avatar realtong avatar renovate[bot] avatar semantic-release-bot avatar xieyezi avatar zjy365 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lobe-cli-toolbox's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/issue-auto-comments.yml
  • wow-actions/auto-comment v1
  • wow-actions/auto-comment v1
  • wow-actions/auto-comment v1
  • actions-cool/issues-helper v3
.github/workflows/issue-close-require.yml
  • actions-cool/issues-helper v3
  • actions-cool/issues-helper v3
  • actions-cool/issues-helper v3
  • actions-cool/issues-helper v3
.github/workflows/issues-translate.yml
  • usthe/issues-translate-action v2.7
.github/workflows/release.yml
  • actions/checkout v4
  • oven-sh/setup-bun v1
.github/workflows/test.yml
  • actions/checkout v4
  • oven-sh/setup-bun v1
npm
package.json
  • @commitlint/cli ^19
  • @sindresorhus/tsconfig ^5
  • @types/lodash-es ^4
  • @types/node ^20
  • @types/pangu ^4
  • @types/react ^18
  • @types/update-notifier ^6
  • @umijs/lint ^4
  • clean-pkg-json ^1
  • commitlint ^19
  • eslint ^8
  • husky ^9
  • ink-testing-library ^3
  • lerna ^8
  • lint-staged ^15
  • multi-semantic-release ^3
  • pkgroll ^2
  • prettier ^3
  • remark ^14
  • remark-cli ^11
  • semantic-release ^21
  • ts-node ^10
  • typescript ^5
  • node >=18
packages/lobe-cli-shebang/package.json
  • commander ^11
  • consola ^3
  • update-notifier ^7
  • node >=18
packages/lobe-cli-ui/package.json
  • @inkjs/ui ^1
  • arr-rotate ^1
  • consola ^3
  • fast-deep-equal ^3
  • figures ^6
  • ink ^4.2
  • react ^18
  • @inkjs/ui >=1
  • consola >=3
  • ink >=4
  • react >=18
  • node >=18
packages/lobe-commit/package.json
  • @inkjs/ui ^1
  • chalk ^5
  • commander ^11
  • conf ^12
  • dotenv ^16
  • execa ^8
  • fast-deep-equal ^3
  • gitconfig ^2
  • gpt-tokenizer ^2
  • ink ^4.2
  • lodash-es ^4
  • octokit ^3
  • pangu ^4
  • path-exists ^5
  • react ^18
  • swr ^2
  • update-notifier ^7
  • zustand ^4
  • ink >=4
  • react >=18
  • node >=18
packages/lobe-i18n/package.json
  • @inkjs/ui ^1
  • chalk ^5
  • commander ^11
  • conf ^12
  • consola ^3
  • cosmiconfig ^9
  • dotenv ^16
  • fast-deep-equal ^3
  • glob ^10
  • gpt-tokenizer ^2
  • gray-matter ^4
  • ink ^4.2
  • json-stable-stringify ^1
  • just-diff ^6
  • lodash-es ^4
  • p-map ^7
  • pangu ^4
  • react ^18
  • remark-frontmatter ^4
  • remark-gfm ^3
  • remark-parse ^10
  • remark-stringify ^10
  • swr ^2
  • unified ^11
  • unist-util-visit ^5
  • update-notifier ^7
  • zustand ^4
  • @types/json-stable-stringify ^1
  • ink >=4
  • react >=18
  • node >=18
packages/lobe-label/package.json
  • @inkjs/ui ^1
  • @octokit/rest ^20
  • commander ^11
  • conf ^12
  • consola ^3
  • ink ^4.2
  • lodash-es ^4
  • react ^18
  • update-notifier ^7
  • ink >=4
  • react >=18
  • node >=18
packages/lobe-seo/package.json
  • @inkjs/ui ^1
  • chalk ^5
  • commander ^11
  • conf ^12
  • consola ^3
  • cosmiconfig ^9
  • dotenv ^16
  • fast-deep-equal ^3
  • glob ^10
  • gpt-tokenizer ^2
  • gray-matter ^4
  • ink ^4.2
  • json-stable-stringify ^1
  • just-diff ^6
  • lodash-es ^4
  • p-map ^7
  • pangu ^4
  • react ^18
  • remark-frontmatter ^4
  • remark-gfm ^3
  • remark-parse ^10
  • remark-stringify ^10
  • swr ^2
  • unified ^11
  • unist-util-visit ^5
  • update-notifier ^7
  • zustand ^4
  • @types/json-stable-stringify ^1
  • ink >=4
  • react >=18
  • node >=18

  • Check this box to trigger a request for Renovate to run again on this repository

[Bug]

💻 系统环境 | Operating System

Windows

🌐 CLI 版本 | CLI Version

最新版

🐛 问题描述 | Bug Description

输入后无法进行任何设置,包括exit回车都不管用

lobe-commit --config

🚦 期望结果 | Expected Behavior

No response

📷 复现步骤 | Recurrence Steps

npm install -g @lobehub/commit-cli
cd D:\Git项目\lobe
lobe-commit --config

📝 补充信息 | Additional Information

No response

[Question] lobe-i18n cli run failed?

🧐 问题描述 | Proposed Solution

First of all, thank you very much for providing this tool!
I'm having some problems now.

This my script:

...
  execSync(`lobe-i18n md --config ${componentTranslateConfigPath}`, {
    cwd: process.cwd(),
    stdio: "inherit",
    env: {
      OPENAI_PROXY_URL: "xxxx",
      OPENAI_API_KEY: "xxxx"
    }
  });
...

and this is my .i18nrc.js:

const path = require("path");
const { defineConfig } = require("@lobehub/i18n-cli");

module.exports = defineConfig({
  markdown: {
    entry: [path.resolve(__dirname, "./index.md")],
    entryLocale: "en-US",
    entryExtension: ".md",
    outputLocales: ["zh-CN"],
    outputExtensions: (locale, { getDefaultExtension }) => {
      //if (locale === "en-US") return ".md";
      return getDefaultExtension(locale);
    }
  }
});

All the config load normally, but it's failed:

ℹ start translate portal doc...                                                17:17:02
o Lobe I18N is analyzing your markdown... 🤯🌏🔍                          17:17:05
o Running in 📄 1 Markdown, and translating to zh-CN locales..            17:17:05
i 📄 To zh-CN: src\portal\index.md                              17:17:05  
i Current model setting: gpt-3.5-turbo (temperature: 0) }                  17:17:05  
──── 📝 E:\project\incall-fuxi\packages\fuxi\src\portal\index.zh-CN.md 
- from en-US to zh-CN [Tokens: 1619]
⠧  0% [0/1 chunks] 

 ERROR  Translate failed, TypeError: Cannot read properties of undefined (reading 'message')        17:17:07  

📝 补充信息 | Additional Information

No response

[Bug] macOS Terminal 重影

💻 系统环境 | Operating System

Windows

🌐 CLI 版本 | CLI Version

2.13.0

🐛 问题描述 | Bug Description

Screen_-2024-03-13_at_19.21.55.mp4

🚦 期望结果 | Expected Behavior

正常运行不会有重影

📷 复现步骤 | Recurrence Steps

在 Terminal 中输入 lobe,随意选择 item 或者输入任何字符即可复现

📝 补充信息 | Additional Information

在 macOS 自带的 Terminal 上运行和 VS Code 内建的 Terminal 都是同样的结果。

Lobe Version: v2.13.0
Node Version: v21.6.1
OS Type: Darwin
OS Platform: darwin
OS Architecture: arm64
OS Release: 23.3.0

[Bug] Cannot read properties of null (reading 'useEffect')

💻 系统环境 | Operating System

macOS

🌐 CLI 版本 | CLI Version

1.18.1

🐛 问题描述 | Bug Description

node: v20.10.0
os: macOS
运行 lobe-i18n -o 报错

ERROR Cannot read properties of null (reading 'useEffect')

node_modules/@lobehub/cli-ui/node_modules/react/cjs/react.development.js:1634:21

1631: }
1632: function useEffect(create, deps) {
1633: var dispatcher = resolveDispatcher();
1634: return dispatcher.useEffect(create, deps);
1635: }
1636: function useInsertionEffect(create, deps) {
1637: var dispatcher = resolveDispatcher();

  • useEffect (node_modules/@lobehub/cli-ui/node_modules/react/cjs/react.development.js:1634:21)
  • (node_modules/@lobehub/cli-ui/dist/index.js:1:4537)
  • renderWithHooks (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:6659:18)
  • updateFunctionComponent (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:10790:20)
  • updateSimpleMemoComponent (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:10627:10)
  • updateMemoComponent (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:10476:14)
  • beginWork (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:12885:16)
  • beginWork$1 (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:19608:14)
  • performUnitOfWork (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:18742:12)
  • workLoopSync (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:18648:5)

🚦 期望结果 | Expected Behavior

No response

📷 复现步骤 | Recurrence Steps

No response

📝 补充信息 | Additional Information

No response

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Cannot push to the Git repository.

semantic-release cannot push the version tag to the branch master on the remote Git repository with URL https://[secure]@github.com/canisminor1990/lobe-commit.git.

This can be caused by:


Good luck with your project ✨

Your semantic-release bot 📦🚀

[Bug] Unreadable text in positive prompt

💻 系统环境 | Operating System

Other Linux

🌐 CLI 版本 | CLI Version

Automatic1111, current, also current for Lobe

🐛 问题描述 | Bug Description

Text in the prompt is unreadable, same color as background. Only when drag selected it is readable. The negative prompt dispplay is fine.

🚦 期望结果 | Expected Behavior

readable prompt

📷 复现步骤 | Recurrence Steps

start, type something,

📝 补充信息 | Additional Information

If I inspect element, in css I have an

element.style {
  color: transparent;
}

If I disble this the text shows again. It seems also that if I deselect the prompt syntax highlighting in the lobe configuration menu, that the issue also resolves.
Enabling the advanced text editor, Scroll or realizable do not change this, nor does activating prompt editor
I am somewhat suspecting it's from nativeTextarea.style.color = 'transparent'; in src/modules/PromptHighlight/App.tsx, but simply changing that didn't resolve the issue

md i18n bug

  1. 链接错位,在英文里被识别成 link 了,且位置不正确。

image

image

  1. 翻译内容丢失
    image
    原文内容:
    image

文件:use-on-standalone-init.md

  1. 标题翻译处理问题

image

原始内容:

image

文件:submit-market.zh-CN.md

  1. 翻译问题

image

原始内容:
image

直接翻译没问题:
image

  1. markdown 标记问题

image

[Bug] WSL2中无法正常输入文字

💻 系统环境 | Operating System

Windows

🌐 CLI 版本 | CLI Version

2.9.3

🐛 问题描述 | Bug Description

WSL2中无法正常输入文字,每当需要输入文字的时候,程序就自动终止了

2023-09-10.15-10-43_x264.mp4
> uname -a  
Linux DESKTOP-C9MSV31 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

> node -v                                
v18.16.0

> lobe-commit -V
2.9.3

🚦 期望结果 | Expected Behavior

No response

📷 复现步骤 | Recurrence Steps

No response

📝 补充信息 | Additional Information

No response

[Bug] CERT_HAS_EXPIRED

💻 系统环境 | Operating System

Windows

🌐 CLI 版本 | CLI Version

2.10.0

🐛 问题描述 | Bug Description

Failed to calculate number of tokens, falling back to approximate count TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RetryOperation._fn (/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/p-retry/index.js:50:12) {
cause: Error: certificate has expired
at TLSSocket.onConnectSecure (node:_tls_wrap:1600:34)
at TLSSocket.emit (node:events:517:28)
at TLSSocket._finishInit (node:_tls_wrap:1017:8)
at ssl.onhandshakedone (node:_tls_wrap:803:12) {
code: 'CERT_HAS_EXPIRED'
}
}

🚦 期望结果 | Expected Behavior

No response

📷 复现步骤 | Recurrence Steps

No response

📝 补充信息 | Additional Information

No response

[Question]

🧐 问题描述 | Proposed Solution

serdgh

📝 补充信息 | Additional Information

wae

prompt input is not at cursor

When i change the prompt by editing, the prompt display and cursor position go out of sync. The prompt wraps differently than is diplayed. If you thereafter place the cursor at a different position, what you type does not end up where you placed the cursor. You can 'fix' this by resizing the prompt box, and then the prompt wrapping will fix itself and then you can type again. My language for the prompt is English. It is not very far off, so maybe it's just an off-by-one for the word wrapping position.
I once worked on an ren'py editor and recall having something similar at one point. It is probably not going to help but that code is here:
edit_button.rpy

[Question] 依赖问题

🧐 问题描述 | Proposed Solution

求助,遇到如下报错

Error: Invalid environment; fetch is not defined
    at new ChatGPTAPI (file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/chatgpt/build/index.js:174:13)
等等

📝 补充信息 | Additional Information

没查到怎么解决这个问题,希望大佬不要打我emmm

[Bug] Cannot read properties of undefined (reading 'text')

💻 系统环境 | Operating System

Mac

🌐 CLI 版本 | CLI Version

2.14.0

🐛 问题描述 | Bug Description

ERROR Cannot read properties of undefined (reading 'text') 17:16:34

at NoOpOutputParser.parseResult (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/@langchain/core/dist/output_parsers/base.js:50:42)
at NoOpOutputParser.parseResultWithPrompt (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/@langchain/core/dist/output_parsers/base.js:17:21)
at LLMChain._getFinalOutput (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/llm_chain.js:121:55)
at LLMChain._call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/llm_chain.js:156:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async LLMChain.call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/base.js:117:28)
at async Promise.all (index 0)
at async MapReduceDocumentsChain._call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/combine_docs_chain.js:184:29)
at async MapReduceDocumentsChain.call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/base.js:117:28)
at async xt.genSummary (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/dist/cli.js:8:1592)

🚦 期望结果 | Expected Behavior

No response

📷 复现步骤 | Recurrence Steps

No response

📝 补充信息 | Additional Information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.