Menu โ–พ โ–ด

#137 [migration] ๐Ÿฅณ TS client initial release

closed
nobody
None
2025-09-13
2025-09-07
Anonymous
No

Originally created by: supreme-gg-gg

๐Ÿฅณ We are releasing the initial developer's version of the typescript instagram CLI client!! ๐Ÿฅณ

Summary

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.]

Notes

In addition, this PR introduces the following utilities:

  1. 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]

  2. Update CI checks to only run on python when instagram is updated and run on TS when instagram-ts is updated

  3. 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 ๐Ÿ˜‚

Related

Tickets: #122
Tickets: #124

Discussion

  • Anonymous

    Anonymous - 2025-09-07

    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 the xo linter check for typescript in the action and the precommit hook once we fixed all the 600+ linter error LMAO

    Once 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.0 is python and ts-v.0.0.0 is 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.

     
  • Anonymous

    Anonymous - 2025-09-07

    Originally posted by: Quimisagi

    Oh, really looking forward to it ๐Ÿ˜†

     
  • Anonymous

    Anonymous - 2025-09-08

    Originally posted by: supreme-gg-gg

    lgtm ๐Ÿ˜„ everything works!

    Though there's a slight UI behavior difference between mock chat UI and the real one, i guess we can borrow some technical debt now lmao

    Can you attach a screenshot of the issue?

     
  • Anonymous

    Anonymous - 2025-09-08

    Originally posted by: endernoke

    Btw the instagram-cli package 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 name

     
  • Anonymous

    Anonymous - 2025-09-08

    Originally posted by: endernoke

    lgtm ๐Ÿ˜„ everything works!
    Though there's a slight UI behavior difference between mock chat UI and the real one, i guess we can borrow some technical debt now lmao

    Can you attach a screenshot of the issue?

    image

    Also it is not in alt screen is this intended

     
  • Anonymous

    Anonymous - 2025-09-08

    Originally posted by: supreme-gg-gg

    lgtm ๐Ÿ˜„ everything works!

    Though there's a slight UI behavior difference between mock chat UI and the real one, i guess we can borrow some technical debt now lmao

    Can you attach a screenshot of the issue?

    image

    Also it is not in alt screen is this intended

    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

     
  • Anonymous

    Anonymous - 2025-09-08

    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.

     
  • Anonymous

    Anonymous - 2025-09-08

    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.

    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.

     
  • Anonymous

    Anonymous - 2025-09-08

    Originally posted by: endernoke

    lgtm ๐Ÿ˜„ everything works!

    Though there's a slight UI behavior difference between mock chat UI and the real one, i guess we can borrow some technical debt now lmao

    Can you attach a screenshot of the issue?

    image
    Also it is not in alt screen is this intended

    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

    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

     
  • Anonymous

    Anonymous - 2025-09-08

    Originally posted by: endernoke

    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.

    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.

    The ASCII feed is working for me... Could you attach a screenshot or video of the issue? thanks!

     
  • Anonymous

    Anonymous - 2025-09-08

    Originally posted by: supreme-gg-gg

    lgtm ๐Ÿ˜„ everything works!

    Though there's a slight UI behavior difference between mock chat UI and the real one, i guess we can borrow some technical debt now lmao

    Can you attach a screenshot of the issue?

    image
    Also it is not in alt screen is this intended

    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

    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

    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.tsx

     
  • Anonymous

    Anonymous - 2025-09-09

    Originally posted by: supreme-gg-gg

    Btw the instagram-cli package 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 name

    I will do this ๐Ÿ˜„, I want to have this merged to main and I will show him a dev release to convince him lol

     
  • Anonymous

    Anonymous - 2025-09-09

    Originally posted by: supreme-gg-gg

    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.

    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.

    @Quimisagi wait try pull from ts-migration/main since 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 screenshot

     
  • Anonymous

    Anonymous - 2025-09-09

    Originally posted by: supreme-gg-gg

    Added the base command when you run npm run start, i.e. instagram to be the same as python behaviour, help is shown after running npm start -- --help, i.e. instagram --help. Also added the types for ascii-art from here: https://www.npmjs.com/package/@types/ascii-art instead of using a custom-written one for better maintainability

    This will be merged tomorrow, if there are any recurrent issues pls ping me

     
  • Anonymous

    Anonymous - 2025-09-09

    Originally posted by: endernoke

    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.tsx

    Let's pretend this doesn't exist then ๐Ÿ˜ญ If technical creditors decide to chase us we'll figure out a fix.

     
  • Anonymous

    Anonymous - 2025-09-09

    Originally posted by: endernoke

    Added the base command when you run npm run start, i.e. instagram to be the same as python behaviour, help is shown after running npm start -- --help, i.e. instagram --help. Also added the types for ascii-art from here: https://www.npmjs.com/package/@types/ascii-art instead of using a custom-written one for better maintainability

    This will be merged tomorrow, if there are any recurrent issues pls ping me

    Nice!! Btw we might want to gradually phase out ascii-art usage in the future. It has a canvas dependency 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 ๐Ÿ˜‚

     
  • Anonymous

    Anonymous - 2025-09-09

    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

     
  • Anonymous

    Anonymous - 2025-09-09

    Originally posted by: endernoke

    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

    No remove it in future PRs lol let's not try to break things 10 mins before prod lmaoo

     
  • Anonymous

    Anonymous - 2025-09-10

    Ticket changed by: supreme-gg-gg

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2025-09-11

    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.

    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.

    @Quimisagi wait try pull from ts-migration/main since 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 screenshot

    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

     
  • Anonymous

    Anonymous - 2025-09-12

    Originally posted by: supreme-gg-gg

    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.

    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.

    @Quimisagi wait try pull from ts-migration/main since 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 screenshot

    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.

    2025-09-11.00-29-28.mp4

    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

     
  • Anonymous

    Anonymous - 2025-09-13

    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.

    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.

    @Quimisagi wait try pull from ts-migration/main since 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 screenshot

    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.

    2025-09-11.00-29-28.mp4

    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

    Yeah
    Will probably create a issue later (ยดโˆ€๏ฝ€)

     

Log in to post a comment.

Monday.com Logo