Originally created by: supreme-gg-gg
๐ฅณ We are releasing the initial developer's version of the typescript instagram CLI client!! ๐ฅณ
Here is how you can try it out:
cd instagram-ts
npm install
npm run build
npm run start <command>
e.g. npm run start chat, npm run start feed
The Typescript client brings a brand-new UI outlook that and guess what, you can view images natively in terminals now!! With our new feed and in-chat image display, we can't wait for all the crazy features that's coming next. Meanwhile, checkout ink-picture, the library that powers terminal image rendering for Ink that we built as part of this project.
In just a few weeks, we will be making our first public release on npm! Stay tuned.]
In addition, this PR introduces the following utilities:
Unified precommit hook using pre-commit in favour of husky. This hook will check: config files + python + typescript all at once but only when the corresponding file types and directories changed. Closes [#124]
Update CI checks to only run on python when instagram is updated and run on TS when instagram-ts is updated
New mocking system that is pretty simple but can reduce API calls during development. This will be scaled up in the future when we have a better idea what sort of unit test / E2E tests we want. For now you can use it based on instructions in instagram-ts/source/mock/readme.md. Closes [#122]
We will soon need to fix all the xo linter errors on typescript and turn on linter for TS precommit + action ๐
Originally posted by: supreme-gg-gg
The CI check for typescript isn't running yet but I believe it will start checking after I merged this it already exists in
prettier-ts.yml. I will turn on thexolinter check for typescript in the action and the precommit hook once we fixed all the 600+ linter error LMAOOnce we are ready for NPM release, I will make a new action for typescript release alongside python. The plan right now is to use tags to differentiate between action (publish) triggers.
v.0.0.0is python andts-v.0.0.0is typescript, the action will look for pushes to these two tags. Idk how it integrates with the github release page yet but should be easy to figure out.Originally posted by: Quimisagi
Oh, really looking forward to it ๐
Originally posted by: supreme-gg-gg
Can you attach a screenshot of the issue?
Originally posted by: endernoke
Btw the
instagram-clipackage name is taken on npm (cli to show simple IG feed) but it is unmaintained. I think we could try contacting the owner to take over the nameOriginally posted by: endernoke
Also it is not in alt screen is this intended
Originally posted by: supreme-gg-gg
I forgot to put it in alr screen lol, but can you point out where is the difference between regular UI cuz it seems the same? The input box bugs but I think it's reported on a previous PR already and is fixable by resizing terminal
Originally posted by: Quimisagi
Is it implemented on
feed? I'm trying it on a PC different to the one I usually use so I don't know if it has something to do, but I tried feed and doesn't look like it's working fine....The ASCII changes itself even if I don't press anything. Also takes tame to re-render when navigating through posts.
Originally posted by: Quimisagi
Hmmm...
Tried my own branch and it's still wrong there. Huh, guess probably I didn't test it thoroughly last time, so probably there's still work to do.
Originally posted by: endernoke
Notice that the bottom of the message history is clipped, I think I fixed it in the last PR by reversing the flexbox anchor but somehow the mock client is still having the bug. @supreme-gg-gg could u look into this if not I'll investigate tmr
Originally posted by: endernoke
The ASCII feed is working for me... Could you attach a screenshot or video of the issue? thanks!
Originally posted by: supreme-gg-gg
wait @endernoke I don't think this is reproducible ๐ญ, also I think the mock chatUI is already wrapped in Alt screen ๐ if you check
source/cli.mock.tsxOriginally posted by: supreme-gg-gg
I will do this ๐, I want to have this merged to main and I will show him a dev release to convince him lol
Originally posted by: supreme-gg-gg
@Quimisagi wait try pull from
ts-migration/mainsince we've pushed a lot of new changes with images / ascii. I have tried it again and it seems to be working properly, let me know if the issue persists or perhaps attach a screenshotOriginally posted by: supreme-gg-gg
Added the base command when you run
npm run start, i.e. instagramto be the same as python behaviour, help is shown after runningnpm start -- --help, i.e. instagram --help. Also added the types forascii-artfrom here: https://www.npmjs.com/package/@types/ascii-art instead of using a custom-written one for better maintainabilityThis will be merged tomorrow, if there are any recurrent issues pls ping me
Originally posted by: endernoke
Let's pretend this doesn't exist then ๐ญ If technical creditors decide to chase us we'll figure out a fix.
Originally posted by: endernoke
Nice!! Btw we might want to gradually phase out
ascii-artusage in the future. It has acanvasdependency which could be troublesome to install on certain platforms... I believe it is the main source of our vulnerabilities as well.Could look into ink-big-text as an alternative for rendering the logo,
This PR has 100 commits now btw ๐
Originally posted by: supreme-gg-gg
lol we've broken new record!! Have u already removed ascii art if not I'll keep it for this PR and remove it next time cuz it might break stuff with ascii prolly isn't zero-shot lol
Originally posted by: endernoke
No remove it in future PRs lol let's not try to break things 10 mins before prod lmaoo
Ticket changed by: supreme-gg-gg
Originally posted by: Quimisagi
Tried this on the machine I usually use and its working fine! It's just a little bit off when I use it on my other laptop, I still have to figure out why...
I don't know if you can tell from the video, but sometimes despite I'm not moving the cursor the ASCII changes suddenly, or after moving the cursor it takes a while to render again. Also the index of the carousel is not displayed below despite it being a carousel post, nor I can open the media pressing 'o'.
As I mentioned before those problems doesn't happen on the machine I usually use, though.
https://github.com/user-attachments/assets/473825f9-ce28-43fc-addf-2c581c38fcf9
Originally posted by: supreme-gg-gg
this is very very interesting, this should not happen if you're running the exact same code on both machines... The carousel index issue might be caused by when we resolve the merge conflicts, but still the behaviour should be consistent across different install on different devices ๐ญ ๐. Perhaps we can take this offline to the discord if this keeps happening and we can investigate more thoroughly than on here
Originally posted by: Quimisagi
Yeah
Will probably create a issue later (ยดโ๏ฝ)