A subpar CLI for interacting with IBM i.
This has just been a little toy project I've been casually working on. I've only really tested it on my work's system with V7R3 and a bit on PUB400 with V7R4. So, this might not work very well for other people.
I'm sure someone could take some ideas or snippets from this and make something way better. This definitely needs a lot more polishing.
- Connection profiles for different systems/users.
- Fetch files and directories from IFS.
- Fetch libraries, source physical files, and source members from QSYS.
- Execute CL, SQL, and shell commands.
- IBM i V7R3+ -
DSPSFWRSC
to check OS version. - User profile with home directory setup on IFS.
- .NET Core runtime
- ODBC driver for IBM i
- Windows - docs/setup-windows.md
- Linux - docs/setup-linux.md
- Mac - Sorry, nothing personal; I don't know a single thing about MacOS.
Here are a few sample commands to show some basic functionality.
kanpachi profile add MY400
- create new profilekanpachi profile ls
- list profileskanpachi qsys get_mbr BOLIB/QRPGLESRC/IFSREAD ./rpgle
- Download source memberkanpachi qsys get_spf BOLIB/QRPGLESRC ./rpgle
- Download source members in BOLIB/QRPGLESRCkanpachi qsys get_lib BOLIB
- download all source physical files from BOLIBkanpachi ifs ls /home/OTTEB/
- list directory contents of /home/OTTEBkanpachi ifs get_dir /home/OTTEB/RPG-BF
- download directory /home/OTTEB/RPG-BF (to current working directory)kanpachi exec cl "DSPLIBL"
- execute CL commandkanpachi exec sh "ls"
- execute shell commandkanpachi exec sql "select SYSTEM_SCHEMA_NAME from QSYS2.SYSSCHEMAS limit 25
- execute SQL command
Complete command documentation in docs/CLI-Docs.md
- IBMi Languages - My syntax highlighter for RPG, RPGLE, CL, DDS, and MI.
- Phase 1 - CLI commands to create profiles, fetch source, and execute commands (SQL, CL, shell)
- Phase 2 - CLI commands to update source on IFS and QSYS
- Phase 3 - API over Kanpachi.LIB
- Phase 4 - VS Code extension (frontend) over Kanpachi.API (separate repository)
I'm only working on this project when I'm in the mood to. So, it might be awhile on a lot of this, if at all.
Stuff I was thinking about while developing, but haven't really started.
- Run Kanpachi CLI interactively (would need to add exit command)
- Generate markdown file for each library's QSYS metadata.
- Command to update local QSYS files based off QSYS metadata updated timestamp. (like
git pull
) - Command to download a spooled file or all spooled files for a job.