Coder Social home page Coder Social logo

gitbito / cli Goto Github PK

View Code? Open in Web Editor NEW
532.0 532.0 68.0 1011.75 MB

Bito CLI (Command Line Interface) provides a command line interface to the Bito AI chat functionality. Over time, CLI will add more functions and new command options to support complex automation and workflows. This is a very early Alpha version. We would love to get your feedback on the new features or improvements.

Home Page: https://bito.ai

License: Other

ai automation bash chatgpt cli command-line command-line-tool developer-tool developer-tools gpt gpt-3 gpt-4 gptchat linux macos prompt-engineering shell terminal windows

cli's People

Contributors

adhirpotdarbito avatar ajwtech avatar bitoandy avatar charlie39 avatar dnyanu76 avatar macky3099 avatar trulyfurqan 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  avatar  avatar  avatar  avatar  avatar  avatar

cli's Issues

curl: (60) SSL certificate problem:

Hi,
good day.
when I run the command in terminal, I got his error:

curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

I read the article, but I didn't understand how to fix this error.

BitoCLI would not work on a brand new installation

Installed BitoCLI on Windows. Opened a brand new dos prompt, typed "bito". Nothing found. A "where bito" did not find anything.

Uninstalled, then reinstalled. This time, when I opened a brand new dos prompt, bito worked, and "where bito" showed "C:\Program Files (x86)\Bito\bito.exe".

Suggest updating BitoCLI so it does not require Admin privileges to install. If it requires Admin privileges, you are excluding most corporate clients as few devs have Admin access in an enterprise setting.

Suggest trying BitoCLI on a brand new Windows install, and working out why it fails the very first time. Perhaps spin up a brand new virtual machine and try a first-time installation?

child_process calling bito returns empty

Can you tell me why this code doesn't work?

image

import child_process from "child_process";

const cmd = child_process.exec("bito -p I:/creator/gitbitoCLI/version-3.0/1.txt -f I:/creator/gitbitoCLI/version-3.0/2.txt", {
	cwd: "I:/creator/gitbitoCLI/version-3.0/",
	encoding: "utf8",
});

let result_s = "";

cmd.stdout!.on("data", (message: Buffer) => {
	result_s += message.toString();
});
const result = new Promise<string>((resolve_f) => {
	cmd.on("close", () => {
		console.log("result: ", result_s);
		resolve_f(result_s);
	});
});

Bito cli intermittent not working

root@siaphisprb08671:~# bito version
Error: unknown command "version" for "bito"
Run 'bito --help' for usage.
root@siaphisprb08671:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
root@siaphisprb08671:~#
root@siaphisprb08671:~# bito
A new version of Bito CLI was found, updating Bito CLI...

Please re-run "bito" to start using the latest version of Bito CLI.

Note: You can set auto-update to false in the config file to turn off the auto update for Bito CLI.

Sorry, it's us, not you. We had an issue. Please try again.
panic: invalid character '<' looking for beginning of value

goroutine 1 [running]:
log.Panic({0xc0000dba28?, 0x34?, 0xc0000db9f8?})
        /usr/local/go/src/log/log.go:388 +0x65
BITO/apiclient.processToken({0xc00014c224, 0x12}, {0x0, 0x0}, {0xc000028600, 0x12}, 0x0?)
        /mnt/d/BitoWorkSpace/Go Projects/BitoCLI/v4/bitocli/apiclient/user-helper.go:246 +0x465
BITO/apiclient.VerifyEmailConfigurations({0x0, 0x0})
        /mnt/d/BitoWorkSpace/Go Projects/BitoCLI/v4/bitocli/apiclient/user-helper.go:211 +0x4cd
BITO/cmd.setConf()
        /mnt/d/BitoWorkSpace/Go Projects/BitoCLI/v4/bitocli/cmd/root.go:25 +0x1d
BITO/cmd.glob..func2(0xbf8040?, {0x8a3380?, 0x0?, 0x0?})
        /mnt/d/BitoWorkSpace/Go Projects/BitoCLI/v4/bitocli/cmd/root.go:53 +0xae
github.com/spf13/cobra.(*Command).execute(0xbf8040, {0xc000024230, 0x0, 0x0})
        /home/mack3099/go/pkg/mod/github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xbf8040)
        /home/mack3099/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/mack3099/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
BITO/cmd.Execute()
        /mnt/d/BitoWorkSpace/Go Projects/BitoCLI/v4/bitocli/cmd/root.go:63 +0x25
main.main()
        /mnt/d/BitoWorkSpace/Go Projects/BitoCLI/v4/bitocli/main.go:46 +0xd7

How to support context

How to support context and what is the format of file content when I use this method

cat bito.txt | bito

Request to make an AUR package

I am thinking of making an AUR package for easier tracking and installation on arch and derivative systems.
I am thinking of naming it bito-ai-cli. Do let me know what you think.

Question about bito CLI usage and repeated captcha prompts

Hello,

I tried running the command "bito -p 1.txt -f 1.py -c 1.log," but it returned an empty value. Additionally, when running bito, I keep receiving prompts to enter a captcha repeatedly.

I would like to know if this behavior is normal. Any insights or guidance on this matter would be greatly appreciated.

Thank you.

Bito CLI in interactive mode hangs forever

Steps to Reproduce:

  1. Type bito in terminal
  2. give the text awk command to print first and last column (or any text).

Expected:
Text Response.

Actual
The command just waits for the response forever (i waited till 6 minutes and pressed Ctrl+c)

Logs i found in ~/.bitoai/etc/logs/bitocli.log

2023/06/29 16:53:48 default-conf.go:248: Creating Session ID...(success)
2023/06/29 16:53:48 default-conf.go:255: Reading UID...(success)
2023/06/29 16:53:48 default-conf.go:47: Setting Viper...(success)
2023/06/29 16:53:48 models.go:54: ******************************** Pointing at: PROD ********************************************3.0
2023/06/29 16:53:48 default-conf.go:255: Reading UID...(success)
2023/06/29 16:53:49 http-util.go:79: Url=https://bitoai.bito.co/ai/v1/funnyMsg/,status=500,deatis =""
2023/06/29 16:53:49 user-helper.go:160: Configurations settings done...(success)
2023/06/29 16:53:49 root.go:31: Set configurations...(success)

My machine details:

Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.2 LTS
Release:	22.04
Codename:	jammy
Linux 5.14.0-1052-oem #59-Ubuntu SMP Fri Sep 9 09:37:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

However, Piping the same text to bito as standard input seems to work. Example:

echo -n "awk command to print first and last colum" | bito

To print the first and last columns using the `awk` command, you can use the following syntax:

shell
awk '{print $1, $NF}' <file>


Here, `$1` represents the first column, and `$NF` represents the last column. Replace `<file>` with the name of the file you want to process.

Logs generated for the above command :

2023/06/29 17:12:14 default-conf.go:248: Creating Session ID...(success)
2023/06/29 17:12:14 default-conf.go:255: Reading UID...(success)
2023/06/29 17:12:14 default-conf.go:47: Setting Viper...(success)
2023/06/29 17:12:14 models.go:54: ******************************** Pointing at: PROD ********************************************3.0
2023/06/29 17:12:14 default-conf.go:255: Reading UID...(success)
2023/06/29 17:12:15 http-util.go:79: Url=https://bitoai.bito.co/ai/v1/funnyMsg/,status=500,deatis =""
2023/06/29 17:12:15 user-helper.go:160: Configurations settings done...(success)

Can someone tell me why the interactive mode doesn't work?

NOTE: I tried to downgrade the bito from 3.3 to 3.0 and also as sudo. But the issue still persists.

error when installion on MacOS

On MacOS.

sudo curl https://alpha.bito.co/downloads/cli/install.sh -fsSL | bash

image

However, I can use bito normally. The error has no impact on using.

Feedback on Bito and CLI

Hi Dev team and everyone behind Bito.ai,

In the command line I zoom in in CMD for better visibility. So the reply fetched is not visible in the cmd. If there's any workaround with it. just started using CLI today only.

image

Can pass prompt in text

Hi,
I found the way provided in doc that using bito in text mode is

echo "give me code for bubble sort in python" | bito

if I need prompt I should provide a file and using the command:

echo "give me code for bubble sort in python" | bito -p myPrompt.txt

Is there anyway that I can pass the prompt in the command ? or can I add the prompt just before the chat message?

Where is the source code?

The purpose of Github is to distribute code, not binaries, right?

Why is the binary more than 11 MB? Is it not just a frontend for a http client that uses the Binto API? How can it then be so big? What more does it contain and do?

support gui app

I know terminal is good for developer. But why not support a gui app, so I can use it more easy~

How to "Continue"?

Instead of writing to a markdown file, I tried Bito to add doxygen documentations directly to my hpp files.
The problem is the generated file is not complete. I know this is not Bito's problem, because using the same prompt and source code file in the Chatgpt will give me similar incomplete results. But in chatgpt, I can say continue and AI will continue from where it stopped. How can I achieve similar things in Bito cli?

getting only the code back from a local bito commandline API request

when I ask for instance:
echo "make a simple bash script to print 'Hello world!'" | bito
I get the following response

Certainly! Here's a simple bash script that prints "Hello world!" when executed:

'''bash
#!/bin/bash

echo "Hello world!"
'''

Save the above code in a file with a `.sh` extension, such as `hello_world.sh`. Make sure to give the file executable permissions by running `chmod +x hello_world.sh` in the terminal. Then, you can execute the script by running `./hello_world.sh` in the terminal, and it will print "Hello world!" as output.

but I would like to get only the code
can I add some prompt text to get there?
or can I get the bito command to return json instead of text?

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.